aboutsummaryrefslogtreecommitdiff
path: root/PuzzleApplet.java
diff options
context:
space:
mode:
authorBen Harris <bjh21@bjh21.me.uk>2023-06-25 13:54:21 +0100
committerBen Harris <bjh21@bjh21.me.uk>2023-06-25 13:54:21 +0100
commitc224416c76e41f284b318adc51f08c3ed11de8e2 (patch)
treeac5e94231756df65163df9ef52f4801923146b23 /PuzzleApplet.java
parent88f86918bfca1935c07eee7f84d98e32ccc2f593 (diff)
downloadpuzzles-c224416c76e41f284b318adc51f08c3ed11de8e2.zip
puzzles-c224416c76e41f284b318adc51f08c3ed11de8e2.tar.gz
puzzles-c224416c76e41f284b318adc51f08c3ed11de8e2.tar.bz2
puzzles-c224416c76e41f284b318adc51f08c3ed11de8e2.tar.xz
Reduce the set of keys from which we generate control characters
midend_process_key() has some generic code for converting MOD_CTRL along with a printing character into a control character. This is derived from the Emscripten front-end because browsers don't do this themselves. Most other front ends seem to depend on the platform for this mapping. The mapping was applied to all printable ASCII characters, but this meant that Ctrl+-, which is commonly used by browsers to mean "zoom out" got converted into CR and then CURSOR_SELECT. That was confusing to say the least. So now, the CTRL mapping is only applied to characters in the roughly alphabetic range (0x40 to 0x7f), and MOD_CTRL applied to a character in the range 0x20 to 0x3f gets a return of PKR_UNUSED instead. That means that Ctrl+- in browsers now works properly. I don't think this will affect other front-ends because they're generally a lot less generous about passing MOD_CTRL to the mid-end. I've tested the GTK port nonetheless and not found any problems.
Diffstat (limited to 'PuzzleApplet.java')
0 files changed, 0 insertions, 0 deletions