On Wed, Jan 17, 2018 at 4:58 PM, Dave Page <dpage@pgadmin.org> wrote:
Hi
To summarise an offline discussion we just had, the intention is to replace the switches with checkboxes for Shift, Control, and Alt/Option, then to try to come up with a set of default shortcuts that work on the major platforms/browsers. Investigation into Javascript's handling of keycodes vs. strings is ongoing to figure out the best way to capture and display the selected keys for non-ASCII locales (String.fromCharCode()).
I have replaced switches with checkboxes and also showing all controls for one preference in single line.
Regarding String.fromCharCode() to reverse map keycode to char (actual char on keyboard) does not work for all keyboard keys.
For eg. on mac with standard keyboard and with my locale settings I got below behaviour.
For key tilde (~) I got keycode 192 (Unicode value of the pressed keyboard key as per docs) and
when I tried to map 192 (String.fromCharCode(192)) to get actual char, I got À
So instead of mapping keycode to char for display purposse I'm using char which is returned by event object