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

Can't type in arobase or accentuated char from Windows Chrome #161

Open
anthony-o opened this issue Jun 3, 2016 · 3 comments
Open

Can't type in arobase or accentuated char from Windows Chrome #161

anthony-o opened this issue Jun 3, 2016 · 3 comments

Comments

@anthony-o
Copy link

I've installed ttyjs 0.2.15 on a Linux server (actually inside a Docker container) and all was working fine since I accessed it from my Linux Chromium.

Now I'm connecting to the server ttyjs from a Windows 7 Chrome "44.0.2403.157 m", and I can't type "@" or any other accentuated character into the TTY... so I can't use ssh for example :(

Is there anything to do to fix this?

@anthony-o
Copy link
Author

anthony-o commented Jun 3, 2016

I've tried to debug it, it seems linked to the fact that I'm using a french keyboard and that for typing in "@" I must type "Alt Gr"+"0" and in term.js, line 2851, if (!key || ev.ctrlKey || ev.altKey || ev.metaKey) return false; it returns false as both ev.ctrlKey & ev.altKey are true (for information key equals to 64 here)...

The problem is that I'm unable to copy / paste to the term, Ctrl-A+Ctrl-V is not working neither...

@anthony-o
Copy link
Author

anthony-o commented Jun 3, 2016

I fixed this with a potentially ugly workaround, replaced the line 2851 with if (!key || (ev.ctrlKey || ev.altKey || ev.metaKey) && !String.fromCharCode(key)) return false;

Nevertheless, this workaround doesn't fix the typing-in accentuated characters (for instance, I've got a direct keyboard key "ù" on my keyboard, when I type in this, the Term outputs (arg: 9)).

@risacher
Copy link

Ttyx (https://github.com/risacher/ttyx) is a fork of tty.js that replaces term.js with xterm.js, updates socket.io to version 1.x, and updates Express to version 4.x. The keyboard handling code is noticeably different between xterm.js and term.js, and I would be very interested to know if your issue occurs with ttyx.

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