Closed ghost closed 14 years ago
I am able to use the up and down arrow keys on a standard US keyboard. What keyboard, web browser, and operating system are you using? Thanks.
not being the original author I just add my 2 cents. I use TryRuby in two environments, at home on the mac I could never use the command history (my kinesis-ergo USB is a little unusual, but the scan codes should be ok) though I only tried the swiss-german keyboard layout. At work on Windows and IE6 the arrow-keys worked most of the time. I use a split keyboard on a PS/2 also with the swiss-german layout, although the keyboard is a US-version (and I am missing one key ...)
I am suspicious that the scan or break code for the swiss-german up arrow is different than that of the us keyboard.
I will look into this and see if there is a different key mapping.
While this would not make sense, anything is possible.
Oops, I commented on this 2 days ago but github did not like my comment I guess. I was trying it on Chrome on Windows. It works in firefox on the same computer.
I made a page at http://tryruby.nfshost.com/keypress_test.html which should help with diagnosing the problem. Can anyone with the problems go to that page, type up, and see what keycode is produced. Eg I got a KeyCode value of 38.
If you are getting anything other than 38 when you hit the up arrow key, please let me know! If this is the case if you could tell me what language your browser is set to as well, basically the UA info, that would be fantastic.
i got 38.
Even on my Mac with the kinesis-Advantage using the swiss-german keyboard layout I get 38 for the up-arrow and 40 for the down arrow. The left arrow is 37 and the right arrow is 39, however, all of these do not work in TryRuby. I neither get command line editing nor command history on the Mac (in Safari that is, I just noticed it will work in Camino (Firefox-derivative) which gives the same KeyCodes). So I have to conclude that his is neither a keyboard- nor a Mac, but a Safari-issue.
The up key also doesn't work on chromium and opera. It works fine for Firefox and internet explorer 6 under wine (most likely ie under windows as well). So it is definitely a JavaScript problem, not a localisation problem. Will work on this when I have some time.
yeah, I should have added this point to the README. It is only confirmed to work on firefox and android.
I agree it would be great if this worked in Chrome.
this now works on safari. i need to test opera, chrome, and explorer. please note that explorer will not be a priority-- especially 6
we have chrome support. now for opera and I will call this ticket done
opera support in is, but i'm convinced that macbooks are just weird. I am going to call this done, but will re open this ticket if when i get back to my linux box this issue exist there too. they keycode for up arrow on a macbook is 38 . This is also true of chrome, so why it gives me & is whacked.
i still use chrome and it is not working.
It should be fixed in the repo. I need to push these changes to the live site. Does it work on trb.sophrinix.com
I was testing on mac chrome. Are you on windows?
yes. on trb.sophrinix.com, the up/down keys work fine, but the delete key doesn't do anything and the backspace key does what the delete key should do.
do you mind going to trb.sophrinix.com/keypress_test.html and pressing delete and backspace and letting me know what they come up for you ( i assume on chrome?)
I'll make the changes to get them in.
I will push the trb.sophrinix.com code to tryruby.sophrinix.com once I know its correct and didn't introduce any new issues.
When i pushed backspace, the page said "8" and then went back a page in my history. Delete is 46.
You can't use arrow keys like you can in a command line. This will be confusing because in one of the lessons it says to press the up arrow to retype the last command.