Issue 202 in shellinabox: -_ key does not work in firefox with 2.10 (and newer?)

339 views
Skip to first unread message

shell...@googlecode.com

unread,
Aug 30, 2012, 10:04:22 PM8/30/12
to shell...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 202 by david.eu...@gmail.com: -_ key does not work in firefox
with 2.10 (and newer?)
http://code.google.com/p/shellinabox/issues/detail?id=202

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.

shell...@googlecode.com

unread,
Aug 31, 2012, 9:36:58 AM8/31/12
to shell...@googlegroups.com

Comment #1 on issue 202 by evila...@gmail.com: -_ key does not work in
This 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.


shell...@googlecode.com

unread,
Aug 31, 2012, 9:44:35 AM8/31/12
to shell...@googlegroups.com

Comment #2 on issue 202 by evila...@gmail.com: -_ key does not work in
I 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.


shell...@googlecode.com

unread,
Aug 31, 2012, 10:04:46 AM8/31/12
to shell...@googlegroups.com

Comment #3 on issue 202 by evila...@gmail.com: -_ key does not work in
Reverting 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



shell...@googlecode.com

unread,
Sep 3, 2012, 3:49:40 AM9/3/12
to shell...@googlegroups.com

Comment #4 on issue 202 by kujans...@gmail.com: -_ key does not work in
Can confirm this issue on FF15 German Keyboard on WinXP SP3 and Win7 x64

shell...@googlecode.com

unread,
Sep 3, 2012, 3:52:50 AM9/3/12
to shell...@googlegroups.com

Comment #5 on issue 202 by kujans...@gmail.com: -_ key does not work in
Forgot to mention.

The following keys are broken too (at least on german keyboards):
1) # '
2) + * ~

shell...@googlecode.com

unread,
Sep 3, 2012, 5:02:28 AM9/3/12
to shell...@googlegroups.com

Comment #6 on issue 202 by kujans...@gmail.com: -_ key does not work in
just found that < > | also does not work :(

shell...@googlecode.com

unread,
Sep 3, 2012, 9:05:16 AM9/3/12
to shell...@googlegroups.com

Comment #7 on issue 202 by glenn.k....@gmail.com: -_ key does not work in
We 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.

shell...@googlecode.com

unread,
Sep 3, 2012, 10:03:48 AM9/3/12
to shell...@googlegroups.com

Comment #8 on issue 202 by evila...@gmail.com: -_ key does not work in
Glen, 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,

shell...@googlecode.com

unread,
Sep 3, 2012, 10:11:56 AM9/3/12
to shell...@googlegroups.com

Comment #9 on issue 202 by glenn.k....@gmail.com: -_ key does not work in
They'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.

shell...@googlecode.com

unread,
Sep 3, 2012, 11:38:59 AM9/3/12
to shell...@googlegroups.com

Comment #10 on issue 202 by delgado....@gmail.com: -_ key does not work in
how do i apply this patch to my existing shellinabox install?


shell...@googlecode.com

unread,
Sep 6, 2012, 3:29:11 PM9/6/12
to shell...@googlegroups.com

Comment #11 on issue 202 by Sean....@gmail.com: -_ key does not work in
Thx 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;

shell...@googlecode.com

unread,
Sep 19, 2012, 12:27:48 PM9/19/12
to shell...@googlegroups.com

Comment #12 on issue 202 by j...@cryregarder.com: -_ key does not work in
FYI: This patch (6 Sep 2012 from Sean) is applied in fedora 16+ (2.14-9).

shell...@googlecode.com

unread,
Sep 20, 2012, 10:42:18 AM9/20/12
to shell...@googlegroups.com

Comment #13 on issue 202 by antangu...@gmail.com: -_ key does not work in
Thanks 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,#,'


shell...@googlecode.com

unread,
Sep 26, 2012, 12:33:08 AM9/26/12
to shell...@googlegroups.com

Comment #14 on issue 202 by tehra...@gmail.com: -_ key does not work in
Sean,

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

shell...@googlecode.com

unread,
Oct 1, 2012, 5:12:30 PM10/1/12
to shell...@googlegroups.com

Comment #15 on issue 202 by antangu...@gmail.com: -_ key does not work in
Ok, 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.

Attachments:
shellinabox-2.14-ff15.patch 15.8 KB
shellinaboxd 587 KB

shell...@googlecode.com

unread,
Nov 12, 2012, 10:13:59 AM11/12/12
to shell...@googlegroups.com

Comment #16 on issue 202 by layhe...@gmail.com: -_ key does not work in
Thanks for the german diff ! :)

shell...@googlecode.com

unread,
Nov 22, 2012, 10:27:42 AM11/22/12
to shell...@googlegroups.com

Comment #17 on issue 202 by harry.pe...@gmail.com: -_ key does not work in
We are maintaining a fork with some of our patches for these kinds of
issues:

https://github.com/pythonanywhere/shellinabox_fork/commits/master

shell...@googlecode.com

unread,
Jan 1, 2013, 11:31:59 PM1/1/13
to shell...@googlegroups.com

Comment #18 on issue 202 by sirko.sc...@gmail.com: -_ key does not work in
Thank you Harry! You made my day! :D

I made a little gentoo overlay for it:
https://ceras.dyndns.org/ceras-overlay.xml

shell...@googlecode.com

unread,
Jan 8, 2013, 8:34:31 AM1/8/13
to shell...@googlegroups.com

Comment #19 on issue 202 by macgar...@gmail.com: -_ key does not work in
I have a fix for the Swiss and French keyboards under Firefox 15.
Attached is the patch to apply to r239.


Attachments:
keyboard.diff 5.1 KB

shell...@googlecode.com

unread,
Jan 8, 2013, 9:49:03 AM1/8/13
to shell...@googlegroups.com

Comment #20 on issue 202 by alex.ani...@gmail.com: -_ key does not work in
Hi,

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.

Attachments:
0001-add-new-keyCodes-used-by-FF15.patch 1.0 KB

shell...@googlecode.com

unread,
Jan 10, 2013, 9:41:28 AM1/10/13
to shell...@googlegroups.com

Comment #21 on issue 202 by a.hei...@gmail.com: -_ key does not work in
thx alex, tested and confirming fix.
only nonworking keys here are now alt gr modifier combos on a german layout.

shell...@googlecode.com

unread,
Jan 14, 2013, 12:40:10 PM1/14/13
to shell...@googlegroups.com

Comment #22 on issue 202 by drenna...@gmail.com: -_ key does not work in
I 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.

shell...@googlecode.com

unread,
Jan 14, 2013, 1:03:37 PM1/14/13
to shell...@googlegroups.com

Comment #23 on issue 202 by alex.ani...@gmail.com: -_ key does not work in
Oh you are right. There was in error with the operators. Here is the
correct patch.

Attachments:
0001-add-new-keyCodes-used-by-FF15.patch 1.0 KB

shell...@googlecode.com

unread,
Jan 16, 2013, 3:00:25 PM1/16/13
to shell...@googlegroups.com

Comment #24 on issue 202 by drenna...@gmail.com: -_ key does not work in
Thanks ! that new patch is working fine in both Firefox 17 and Chrome for
me.

shell...@googlecode.com

unread,
Feb 2, 2013, 3:41:30 AM2/2/13
to shell...@googlegroups.com

Comment #25 on issue 202 by furydonn...@gmail.com: -_ key does not work in
Hi, 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.

shell...@googlecode.com

unread,
Feb 2, 2013, 4:20:09 AM2/2/13
to shell...@googlegroups.com

Comment #26 on issue 202 by furydonn...@gmail.com: -_ key does not work in
Found 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.

shell...@googlecode.com

unread,
Feb 25, 2013, 3:41:56 PM2/25/13
to shell...@googlegroups.com

Comment #27 on issue 202 by tom.at.t...@gmail.com: -_ key does not work in
Is 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

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

shell...@googlecode.com

unread,
May 27, 2013, 2:35:28 AM5/27/13
to shell...@googlegroups.com

Comment #28 on issue 202 by strubblm...@gmail.com: -_ key does not work in
I have the same question as Tom.

shell...@googlecode.com

unread,
Jul 30, 2013, 2:29:06 AM7/30/13
to shell...@googlegroups.com

Comment #29 on issue 202 by furydonn...@gmail.com: -_ key does not work in
Here is a patch file that works for me with FF19+

Attachments:
sib.patch 2.1 KB

shell...@googlecode.com

unread,
Aug 21, 2013, 4:27:10 AM8/21/13
to shell...@googlegroups.com

Comment #30 on issue 202 by buzypi: -_ key does not work in firefox with
The sib.patch seemed to work fine for me.

Can you please pull this change?

shell...@googlecode.com

unread,
Dec 9, 2013, 9:31:34 AM12/9/13
to shell...@googlegroups.com

Comment #31 on issue 202 by Matthias...@googlemail.com: -_ key does not
work in firefox with 2.10 (and newer?)
http://code.google.com/p/shellinabox/issues/detail?id=202

Why isn't the patch included in the official version? It's time to do that.

shell...@googlecode.com

unread,
Dec 9, 2013, 9:38:25 AM12/9/13
to shell...@googlegroups.com

Comment #32 on issue 202 by Matthias...@googlemail.com: -_ key does not
work in firefox with 2.10 (and newer?)
http://code.google.com/p/shellinabox/issues/detail?id=202

None of these patches work with a german layouted Firefox 25.

shell...@googlecode.com

unread,
Feb 4, 2014, 4:28:43 AM2/4/14
to shell...@googlegroups.com

Comment #33 on issue 202 by prabhu.r...@payoda.com: -_ key does not work in
Team of SIAB, could you please update the status of this bug?

shell...@googlecode.com

unread,
Mar 18, 2014, 4:33:14 AM3/18/14
to shell...@googlegroups.com

Comment #34 on issue 202 by byteki...@gmail.com: -_ key does not work in
Same Problem here with FF 27.0.1 and german Layout

shell...@googlecode.com

unread,
Jun 25, 2014, 5:13:08 PM6/25/14
to shell...@googlegroups.com

Comment #35 on issue 202 by stephane...@koozali.org: -_ key does not work
FF30 and the issue is still occurring, both on debian7.5 and centos6.5

shell...@googlecode.com

unread,
Jul 5, 2014, 5:22:24 AM7/5/14
to shell...@googlegroups.com

Comment #36 on issue 202 by a...@hackerrank.com: -_ key does not work in
So 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

shell...@googlecode.com

unread,
Jul 21, 2014, 7:33:44 PM7/21/14
to shell...@googlegroups.com

Comment #37 on issue 202 by helloliz...@hotmail.com: -_ key does not work
try hitting the mac key (cmd) or windows key

shell...@googlecode.com

unread,
Feb 23, 2015, 11:42:27 PM2/23/15
to shell...@googlegroups.com

Comment #38 on issue 202 by obivonha...@gmail.com: -_ key does not work in
firefox with 2.10 (and newer?)
https://code.google.com/p/shellinabox/issues/detail?id=202

What 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

shell...@googlecode.com

unread,
Mar 5, 2015, 8:48:57 AM3/5/15
to shell...@googlegroups.com

Comment #39 on issue 202 by luka.kra...@gmail.com: -_ key does not work in
Hi, 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.

shell...@googlecode.com

unread,
Jul 9, 2015, 12:01:33 PM7/9/15
to shell...@googlegroups.com

Comment #40 on issue 202 by rogerdp...@gmail.com: -_ key does not work in
FWIW 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.

shell...@googlecode.com

unread,
Jul 9, 2015, 12:03:55 PM7/9/15
to shell...@googlegroups.com

Comment #41 on issue 202 by rogerdp...@gmail.com: -_ key does not work in
firefox with 2.10 (and newer?)
https://code.google.com/p/shellinabox/issues/detail?id=202

FWIW 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).
Reply all
Reply to author
Forward
0 new messages