Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimum working patch to add AltGr + "#", "{", "[", "|", "`" and "\" tested on French keyboard #91

Open
VigibotDev opened this issue Oct 7, 2015 · 3 comments

Comments

@VigibotDev
Copy link

On French keyboard, I can't write the backslash, it back delete instead :

AltGr combined with [3] to [8] keys do not work
-> These is no "#", "{", "[", "|", "`" and "", this is anoying:(

But :
AltGt + 1 "~"
AltGt + 9 "^"
AltGt + 0 "@"
AltGt + ) "]"
AltGt + = "}"

Are OK

@VigibotDev
Copy link
Author

I found the bug :D
I added "if (ev.altKey && ev.ctrlKey) {"
before "if (ev.ctrlKey) {"
and I replaced with "} else if (ev.ctrlKey) {"

To work this part of code need "ev.ctrlKey" without "ev.altKey" or reciprocally

There is another equivalent code : "ev.ctrlKey and not ev.altKey" / "ev.altKey and not ev.ctrlKey" for the two "if".

Diff with current master :

(root|/var/www/js) diff term.js term.js.master
2761,2763c2761
<       if (ev.altKey && ev.ctrlKey) {
<
<       } else if (ev.ctrlKey) {
---
>       if (ev.ctrlKey) {

Working code :

    // F11
    case 122:
      key = '\x1b[23~';
      break;
    // F12
    case 123:
      key = '\x1b[24~';
      break;
    default:
      // a-z and space
      if (ev.altKey && ev.ctrlKey) { // Added

        // Empty

      } else if (ev.ctrlKey) {
        if (ev.keyCode >= 65 && ev.keyCode <= 90) {
          // Ctrl-A
          if (this.screenKeys) {
            if (!this.prefixMode && !this.selectMode && ev.keyCode === 65) {
              this.enterPrefix();
              return cancel(ev);
            }
          }
          // Ctrl-V
          if (this.prefixMode && ev.keyCode === 86) {
            this.leavePrefix();
            return;
          }
          // Ctrl-C

@VigibotDev VigibotDev changed the title No Backslash and | Minimum working patch to add AltGr + "#", "{", "[", "|", "`" and "\" tested on French keyboard Oct 8, 2015
@VigibotDev
Copy link
Author

Ok on Firefox NOK on Internet Explorer 11 :(

@yoshiokatsuneo
Copy link

The Pull-Request also fixes non-english issues.
#97

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants