3 ms·
I'm on Win7. Actually I made a slight mistake on my original comment. You get "[" by pressing ALTGR+"8" not ALT+"8". Don't know if it makes a difference.
by cx01 16y ago
I'm on Win7. Actually I made a slight mistake on my original comment. You get "[" by pressing ALTGR+"8" not ALT+"8". Don't know if it makes a difference.
- chrisdone 16y agoOK, I'll try to get hold of a Win7 machine at work. Can't make any promises though! (Nearly everyone at my workplace uses Linux.) Hopefully a kind soul of German persuasion with JavaScript know-how and a penchant for Windows will come along and fix it.
- cx01 16y agoI noticed that Opera sends two keypress events when I press "[". The first event (that generates the erroneous "8") has e.altKey==true. So a simple solution might be to add the following to the keypress function "if(e.altKey) return;". I've tested this locally and it works for me, but don't know if it might interfere with other keyboard layouts.
- chrisdone 16y agoHmm. I think we can take the risk and if others complain we can deal with their layout too. Someone else also suggested ignoring e.altKey with this patch: http://hpaste.org/fastcgi/hpaste.fcgi/view?id=25853#a25859 http://hpaste.org/fastcgi/hpaste.fcgi/view?id=25853#a25859 I will try applying this patch and let you know.
- chrisdone 16y agoOk, I applied the patch mentioned in the other post. Please try now and let me know if the issue still exists!
- cx01 16y agoWhen I go to tryhaskell.org, it still doesn't work. I believe the patch that you've mentioned only applies to when the user presses ALT+TAB, which won't help here. I'd suggest you either do "if(e.altKey)return;" or "if(e.altKey && e.ctrlKey)return;". Both work for me. EDIT: Hm, my suggested changes work in Opera, but they break Chrome... This is driving me crazy.