> Am 23.11.2022 um 07:57 schrieb Jason McIntyre <j...@kerhand.co.uk>:
> 
> On Wed, Nov 23, 2022 at 12:21:26AM +0100, Mike Fischer wrote:
>> Hi!
>> 
>> I???m trying to use a German Apple Mac keyboard with OpenBSD 7.2 and I???d 
>> like to match the mapping to that of macOS.
>> 
>> `wsconsctl keyboard.encoding=de` helps, but several mappings are 
>> different/missing. For example the pipe character | should be alt-7 but 
>> isn???t. Mostly the alt-combinations are missing or wrong.
>> 
>> So I thought I could use keyboard.map settings to correct this. But I 
>> can???t find any documentation of the format ??? very unusual for OpenBSD.
>> 
>> Did I miss something?
>> 
>> Can someone point me to the documentation please?
>> 
>> Thanks!
>> 
>> Mike
>> 
> 
> hi.
> 
> maybe you are looking for wsksymdef.h:
> 
>    WSCONSCTL(8)        System Manager's Manual         WSCONSCTL(8)
> 
>       ...
> 
>        Modify the current keyboard encoding so that, when the Caps
>        Lock key is pressed, the same encoding sequence as Left
>        Control is sent.  For a full list of keysyms, and keycodes,
>        refer to the /usr/include/dev/wscons/wsksymdef.h file.
> 
>              # wsconsctl keyboard.map+="keysym Caps_Lock =
>              Control_L"
> 
> jmc

Yes, I did look at the source but wasn’t sure about the implications. I gather 
that removing the KS_ or K*_L*_ prefix from the defines yields the entities I 
can use for wsconsctl. Ok, that helps somewhat.


I’m still confused about the 2-4 columns in the keycode = <1> <2> <3> <4> 
syntax. No documentation insight for that, AFAICT. The first 2 seem to be 
<plain key> <shift><plain key>. But what are the last two columns?

`wsconsctl keyboard.map` does not seem to show show all keycodes. For the de 
layout the first entry is 'keycode 4 = a A‘. What about keycode 1-3 (or 0-3 
depending on where the values start)? Maybe that is normal because keyboards 
don’t actually use all keycodes? Who knows?

And some Apple keyboards also have an <fn> key which acts as a modifier. I 
don’t see that mentioned anywhere. Or is that the KS_Mode_switch?


Thanks for your help!
Mike

Reply via email to