5 ms·
Wait, how does the national keyboard layout matter? Aren't you using the US layout when writing code?
by andrey-g 11y ago
Wait, how does the national keyboard layout matter? Aren't you using the US layout when writing code?
- Someone1234 11y agoThat isn't how keyboards work. If a key is assigned to a different keyboard code, then when you push the button the OS will recognise that code regardless of layout configuration. Norwegian keyboards have a different physical layout meaning different character codes are sent for the same location.
- Mandatum 11y agoBut surely there are tools to remap X-language physical keyboard codes to the US layout? Here's diagrams of the mappings. https://www.terena.org/activities/multiling/ml-mua/test/kbd-all.html https://www.terena.org/activities/multiling/ml-mua/test/kbd-... And here's usbkbd (note scancodes at the top): http://lxr.free-electrons.com/source/drivers/hid/usbhid/usbkbd.c http://lxr.free-electrons.com/source/drivers/hid/usbhid/usbk... Explanation on scancodes, which map to which keys for different physical boards: http://www.quadibloc.com/comp/scan.htm http://www.quadibloc.com/comp/scan.htm
- Someone1234 11y agoI suppose you could use something like autohotkey to do that, but it would require intercepting and generating new key presses for every altered key on the keyboard, and could theoretically cause input-swaps if one keypress took longer than a subsequent keypress (e.g. due to a context switch).