3 ms·
I 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 mi
by cx01 16y ago
I 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.