What steps will reproduce the problem? 1. use firefox to access shellinabox and try to use the -_ key (US keyboard), nothing happens. The - key on the keypad does work
I can also reproduce this problem on the example shell on the project home page
I did not have this problem with chrome, but with it I was getting a large memory leak.
Comment #1
Posted on Aug 31, 2012 by Quick OxThis is happening to me also, on a UK keyboard.
The - (minus) and _ (underscore, shift-minus) keystrokes are not registering under Firefox 15 on MS Windows 7 SP1. However these keystrokes do work under Internet Explorer 8 on Win7SP1.
This only applies to the minus key on the main alpha keypad. The minus key on the numeric keypad seems to work okay.
A workaround is to use the minus key on the numeric keypad. However this workaround does not work for underscore. To enter an underscore, I have to copy it into the clipboard from another program (e.g. Notepad) and then paste it into the Shellinabox tab in Firefox.
This bug appears to be limited to Firefox. However I can input a minus and underscore correctly on any other web page that I load on Firefox (e.g. to report this bug. This bug comment was submitted using Firefox 15, and I can type minus or underscore to my heart's content ----____ but in the very same browser instance, on another tab, I cannot enter a minus or underscore into Shellinabox.
ShellInABox version 2.10 (revision 186) Firefox 15
This issue is has suddenly made Shellinabox unusable for me (I write a lot of shell commands which require minus to pass parameters), which is very frustrating. I would be most grateful for the developers to investigate urgently.
Comment #2
Posted on Aug 31, 2012 by Quick OxI strongly suspect this is due to a recent change in the Firefox/Gecko virtual key codes which affects Firefox 15.
Quote from https://github.com/openlayers/openlayers/issues/605
Firefox 15 is likely to break some of the KeyboardDefaults funtionality. Currently in FF 15b1, the minus (-) key does not get captured by the KeyboardDefaults Control anymore.
Any other key seem to be fine so far, but according to the following docs, the plus (+) key will change as well: https://developer.mozilla.org/en/DOM/KeyboardEvent#Virtual_key_codes
New minus code (-): 173 New plus code (+): 171 (both are for the 'normal' keyboard. The keypad codes don't seem to have changed (yet))
None of the OpenLayers.Event.KEY_* are affected atm AFAICT.
Comment #3
Posted on Aug 31, 2012 by Quick OxReverting to Firefox 14 and preventing automatic updates (Tools - Options - Advanced - Update) works around this problem.
However it is not a good idea to use an outdated browser in the long term.
Firefox 14 can be downloaded from: http://www.oldversion.com/Mozilla-Firefox.html
Comment #4
Posted on Sep 3, 2012 by Helpful CamelCan confirm this issue on FF15 German Keyboard on WinXP SP3 and Win7 x64
Comment #5
Posted on Sep 3, 2012 by Helpful CamelForgot to mention.
The following keys are broken too (at least on german keyboards): 1) # ' 2) + * ~
Comment #6
Posted on Sep 3, 2012 by Helpful Cameljust found that < > | also does not work :(
Comment #7
Posted on Sep 3, 2012 by Happy HorseWe had trouble with #, ~, -, and _
Here is a patch that seems to fix it:
@@ -2685,6 +2685,8 @@ VT100.prototype.handleKey = function(event) {
}
if (ch == undefined) {
switch (key) {
+ case 163: /* # for FF15 / ch = this.applyModifiers(35, event); break;
+ case 173: / - for FF15 / ch = this.applyModifiers(45, event); break;
case 8: / Backspace / ch = '\u007f'; break;
case 9: / Tab / ch = '\u0009'; break;
case 10: / Return / ch = '\u000A'; break;
@@ -2859,6 +2861,8 @@ VT100.prototype.fixEvent = function(event) {
var u = undefined;
var s = undefined;
switch (this.lastNormalKeyDownEvent.keyCode) {
+ case 163: / # -> ~ FF15 / u = 96; s = 126; break;
+ case 173: / - -> _ FF15 / u = 45; s = 95; break;
case 39: / ' -> " / u = 39; s = 34; break;
case 44: / , -> < / u = 44; s = 60; break;
case 45: / - -> _ */ u = 45; s = 95; break;
It's applied to an older version of vt100, so the line numbers may not be exactly right, but I checked and they're in the right ball-park. I put the changes at the start of the switch statements so it should be easy to find.
Comment #8
Posted on Sep 3, 2012 by Quick OxGlen, that's great, thank-you. I'll have a go compiling and testing it over the next few days if I get time.
Do your changes enable both IE8/Chrome/FF14 and FF15, or do your changes make it such that the program only works in FF15?
Thanks again,
Comment #9
Posted on Sep 3, 2012 by Happy HorseThey're additions, so Chrome and co. should work fine. I did some basic testing and everything seems to be OK in all browsers. I'd love to hear how this behaves on other nationality keyboards, though. I have a UK keyboard.
Comment #10
Posted on Sep 3, 2012 by Happy Birdhow do i apply this patch to my existing shellinabox install?
Comment #11
Posted on Sep 6, 2012 by Massive RhinoThx Glenn. My setup only had issues with "-" and "_". (Firefox 15.0, windows 7, US keyboard, shellinabox 2.14) This is my patch for the 2.14 source archive in case anyone is interested.
diff --git a/original/shellinabox-2.14/shellinabox/vt100.js b/patched/shellinabox-2.14/shellinabox/vt100.js --- a/original/shellinabox-2.14/shellinabox/vt100.js +++ b/patched/shellinabox-2.14/shellinabox/vt100.js @@ -2742,6 +2742,7 @@ VT100.prototype.handleKey = function(event) { case 187: /* = / ch = this.applyModifiers(61, event); break; case 188: / , / ch = this.applyModifiers(44, event); break; case 189: / - / ch = this.applyModifiers(45, event); break; + case 173: / - / ch = this.applyModifiers(45, event); break; // FF15 Patch case 190: / . / ch = this.applyModifiers(46, event); break; case 191: / / / ch = this.applyModifiers(47, event); break; // Conflicts with dead key " on Swiss keyboards @@ -2886,6 +2887,7 @@ VT100.prototype.fixEvent = function(event) { case 187: / = -> + / u = 61; s = 43; break; case 188: / , -> < / u = 44; s = 60; break; case 189: / - -> _ / u = 45; s = 95; break; + case 173: / - -> _ / u = 45; s = 95; break; // FF15 Patch case 190: / . -> > / u = 46; s = 62; break; case 191: / / -> ? / u = 47; s = 63; break; case 192: / ` -> ~ */ u = 96; s = 126; break;
Comment #12
Posted on Sep 19, 2012 by Helpful WombatFYI: This patch (6 Sep 2012 from Sean) is applied in fedora 16+ (2.14-9).
Comment #13
Posted on Sep 20, 2012 by Happy BearThanks a lot for writing this very useful pease of software! I'm using your shellinabox since some time and I'm very satisfied with it. I further analysed and found the following keycodes. However, I don't understand your modifier implementation. Now I'm running on ff14 which is really unsatisfying! I would really appreciate some help on this. Probably I'll find time in the next weeks...
German keyboard layout.
Keycode, normal, shift, alt-gr 173,-,_ 60,<,> 171,+,*,~ 63,ß,?,\ 160,^,° 192,´,` 163,#,'
Comment #14
Posted on Sep 26, 2012 by Happy PandaSean,
I applied your patch, but the problem persists. Still no hyphen or underscore for me.
ShellInABox version 2.10 (revision 239) Firefox 15.0.1 Ubuntu 10.04
Comment #15
Posted on Oct 1, 2012 by Happy BearOk, I found some time. I fixed the problem with the German keyboard. However, the fix is really stupid, because I still don't understand the meta-key handling. The patch is against the version source 2.14. The attached binary can be used in Debian. Just install the shellinabox_2.9-1_i386.deb package and replace the binary with the attached one.
Changes: - fix keyboard problem (tested with German keyboard) - change window title to "News" - clear screen if connection is lost
I hope it can help someone.
- shellinabox-2.14-ff15.patch 15.82KB
- shellinaboxd 587.27KB
Comment #16
Posted on Nov 12, 2012 by Massive HippoThanks for the german diff ! :)
Comment #17
Posted on Nov 22, 2012 by Helpful RhinoWe are maintaining a fork with some of our patches for these kinds of issues:
https://github.com/pythonanywhere/shellinabox_fork/commits/master
Comment #18
Posted on Jan 2, 2013 by Massive BearThank you Harry! You made my day! :D
I made a little gentoo overlay for it: https://ceras.dyndns.org/ceras-overlay.xml
Comment #19
Posted on Jan 8, 2013 by Helpful OxI have a fix for the Swiss and French keyboards under Firefox 15. Attached is the patch to apply to r239.
- keyboard.diff 5.12KB
Comment #20
Posted on Jan 8, 2013 by Quick WombatHi,
I have a different approach to fix this problem. Firefox is correctly creating the keyPress events with charCodes. So the only thing to do, is to ignore the keys during keyDown and let the keyPress event handle the keys. So the new keyCodes simply should be recognized as normal keys.
Comment #21
Posted on Jan 10, 2013 by Swift Pandathx alex, tested and confirming fix. only nonworking keys here are now alt gr modifier combos on a german layout.
Comment #22
Posted on Jan 14, 2013 by Swift LionI tried the 0001-add-new-keyCodes-used-by-FF15.patch and it fixed the issue for Firefox. However TAB stopped working for Chrome, not sure if any other keys were affected.
Comment #23
Posted on Jan 14, 2013 by Quick WombatOh you are right. There was in error with the operators. Here is the correct patch.
Comment #24
Posted on Jan 16, 2013 by Swift LionThanks ! that new patch is working fine in both Firefox 17 and Chrome for me.
Comment #25
Posted on Feb 2, 2013 by Helpful OxHi, there's still a problem with french layout keyboard even with the latest patch
Following keyCodes are not caught : ^ (160 - dead key) $ (164) * (170) ù (165) ! (161) : (58) < (60)
Found keycodes on http://www.asquare.net/javascript/tests/KeyCode.html
I'll try to find a solution by myself but it'll take some time, perhaps someone can find an answer more quicker.
Comment #26
Posted on Feb 2, 2013 by Helpful OxFound it ... don't hurt me : I hadn't reload in Firefox after update :)
However, I guess the patch should also be applied in function keyUp
Sorry.
Comment #27
Posted on Feb 25, 2013 by Quick HippoIs this fix not going to go into git clone https://code.google.com/p/shellinabox/ ?
I really would rather not apply a patch to be able to use _ or - ...
-Tom
Comment #28
Posted on May 27, 2013 by Quick RhinoI have the same question as Tom.
Comment #29
Posted on Jul 30, 2013 by Helpful OxHere is a patch file that works for me with FF19+
- sib.patch 2.1KB
Comment #30
Posted on Aug 21, 2013 by Happy HippoThe sib.patch seemed to work fine for me.
Can you please pull this change?
Comment #31
Posted on Dec 9, 2013 by Happy RabbitComment deleted
Comment #32
Posted on Dec 9, 2013 by Happy RabbitNone of these patches work with a german layouted Firefox 25.
Comment #33
Posted on Feb 4, 2014 by Massive LionComment deleted
Comment #34
Posted on Mar 18, 2014 by Happy HippoSame Problem here with FF 27.0.1 and german Layout
Comment #35
Posted on Jun 25, 2014 by Happy ElephantFF30 and the issue is still occurring, both on debian7.5 and centos6.5
Comment #36
Posted on Jul 5, 2014 by Quick GiraffeSo I took the ubuntu upstream sources, and added some fixes (including firefox/ipad fixes from the fork at pythonanywhere/shellinabox_fork)
Source: https://github.com/anilgulecha/shellinabox Debian package: https://github.com/anilgulecha/shellinabox/releases/download/2.14.2/shellinabox_2.14-1_amd64.deb
Install this via: sudo dpkg -i shellinabox_2.14-1_amd64.deb
Comment #37
Posted on Jul 21, 2014 by Grumpy CamelComment deleted
Comment #38
Posted on Feb 24, 2015 by Quick LionWhat would be the required set of tests to get one of these patches applied to the main code stream for Shell In a Box? I'm willing to test on EN_US keyboards with a smattering of distros, but I don't use the foreign keyboards. I have other minor changes to the source for my implementation on Debian Wheezy so it would be nice to not fork very far from the main code. For now I can work with the copy/paste from text editor workaround, but that isn't a long term solution.
I'm on a windows 7 client with FF 35.
--thanks-for-a-cool-package, Von
Comment #39
Posted on Mar 5, 2015 by Helpful ElephantHi, obivonha...@gmail.com
We are also interested in maintaining shellinabox project, but we cannot contact original owners. You can checkout issue #261 and leave a message there, if you want to help us or join us :)
https://code.google.com/p/shellinabox/issues/detail?id=261
For starters we created a fork on github and will try to gather patches from this issues.
https://github.com/shellinabox
Hope that helps.
Comment #40
Posted on Jul 9, 2015 by Helpful WombatComment deleted
Comment #41
Posted on Jul 9, 2015 by Helpful WombatFWIW you can use the "minus" key in the 10 key part of your keyboard as a workaround for the "dash" key not working...no underscore (etc.) though. Or use Chrome etc. (can't believe google code doesn't let you edit a comment. yikes. maybe that's why it is going away LOL).
Status: New
Labels:
Type-Defect
Priority-Medium