Closed alexrsagen closed 1 year ago
Thank you for the PR!
For the record, could you post a photograph here of a keyboard featuring this layout?
The following images show keyboards with a scandinavian (Norwegian/Danish/Swedish/Finnish?) ISO layout.
HP 803181-DX1:
Logitech MK710 (Norwegian keys are colored green):
The key to the left of the Backspace has about five symbols on it!? Can you briefly explain how this works?
To the left of the Number 1 key, we've got six symbols, one of which is repeated 3 times...
Welcome to the cursed world of international keyboard layouts. Yeah, some of the symbols on those keys are for different keyboard layouts. I suggest looking at the Logitech keyboard, as it colors the Norwegian layout options in green.
For the Norwegian layout, the following applies:
OEM8
: |
normally, §
with Shift
(not affected by caps lock). No other combinations.OEM+
: \
normally, ` (accent grave) with Shift
(not affected by CapsLock
), ´
(apostrophe) with AltGr
. This is an accent key (does not apply to backslash), meaning that AltGr
+OEM+
followed by e
turns into é
for example. No other combinations.All applications support the accent key, but I'm not sure if the OS is responsible for handling this or the individual application. Thus, I am not sure if pc-keyboard
should also handle this.
Ah, I think they are called "dead keys". Currently the user of pc-keyboard will need to observe that a dead key has been pressed, and do the right thing with the next key that comes out. We could perhaps add something so that you know when it is a dead key and when it isn't, or perhaps even do the combination automatically if you request it.
At least in the Norwegian keyboard layout, Ctrl+Alt is equal to AltGr.
Also, the right alt key is only AltGr on some keyboard layouts, not all layouts have an AltGr key. I haven't changed anything in this regard, but it might be useful to make that distinction in the different keyboard layouts in the future (instead of in
EventDecoder::process_keyevent
).