NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: USB-keyboard with a non-standard layout in wscons




On Jun 26, 2015, at 8:15 AM, Hans dinsen-hansen wrote:


Note that the map does not start with keycode 1.
That's odd. Does escape work? Are you sure? The maps are compiled in the kernel. for dk.nodead I have
%head map
map=
keycode 1 = Cmd_Debugger Escape
keycode 2 = 1 exclam
keycode 3 = 2 quotedbl at at
keycode 4 = 3 numbersign sterling sterling
keycode 5 = 4 currency dollar dollar
keycode 6 = 5 percent
keycode 7 = 6 ampersand
keycode 8 = 7 slash braceleft braceleft
keycode 9 = 8 parenleft bracketleft bracketleft
So, you'd be missing Escape, 1, 2, 3

It is clear that
keycode=49 yields the un-wanted characters and keycode=50
yields the characters that are standard for a Danish keyboard.

My/etc/rc.local now contains:
 ... <snip ...
# set a new mapping to give:
# keycode 49 = apostrophe asterisk
# /sbin/wsconsctl -w map="keycode 49 = apostrophe asterisk"
Yeah, it needs to map+=, or you replace the map with just that 1 entry. You should probably try on the command line, before editing rc.local, just yet. You can give yourself some insurance by doing something
like
(sleep 120 ; wsconsctl -w encoding=dk.nodead ) &
and then experiment.  If you change anything with -w map+=
encoding should change to "user". To verify you're targeting the right key, I'd change it to something like
wsconsctl -w map+="keycode 49 = exclamdown" | grep 49
Then try the key, then fix it, then put it in rc.local.
I kinda suspect it's not 49, or the maps have changed quite a lot
between netbsd versions, and I noticed earlier lower codes corresponded to scan codes, but then again keyboards can produce the wrong scan codes...

%grep 49 map* map.dknodead:keycode 49 = n N
map.us:keycode 49 = n N
%grep 50 map*map.dknodead:keycode 50 = m M
map.us:keycode 50 = m M
%diff map.us map.dknodead
4,6c4,6
< keycode 3 = 2 at
< keycode 4 = 3 numbersign
< keycode 5 = 4 dollar
---
> keycode 3 = 2 quotedbl at at
> keycode 4 = 3 numbersign sterling sterling
> keycode 5 = 4 currency dollar dollar
8,14c8,14
< keycode 7 = 6 asciicircum
< keycode 8 = 7 ampersand
< keycode 9 = 8 asterisk
< keycode 10 = 9 parenleft
< keycode 11 = 0 parenright
< keycode 12 = minus underscore
< keycode 13 = equal plus
---
> keycode 7 = 6 ampersand
> keycode 8 = 7 slash braceleft braceleft
> keycode 9 = 8 parenleft bracketleft bracketleft
> keycode 10 = 9 parenright bracketright bracketright
> keycode 11 = 0 equal braceright braceright
> keycode 12 = plus question
> keycode 13 = apostrophe grave bar bar
27,28c27,28
< keycode 26 = bracketleft braceleft
< keycode 27 = bracketright braceright
---
> keycode 26 = aring gr_E
> keycode 27 = diaeresis asciicircum asciitilde asciitilde
40,42c40,42
< keycode 39 = semicolon colon
< keycode 40 = apostrophe quotedbl
< keycode 41 = grave asciitilde
---
> keycode 39 = gr_z gr_Z
> keycode 40 = gr_c Ooblique
> keycode 41 = onehalf gr_At
44c44
< keycode 43 = backslash bar
---
> keycode 43 = apostrophe asterisk
52,54c52,54
< keycode 51 = comma less
< keycode 52 = period greater
< keycode 53 = slash question
---
> keycode 51 = comma semicolon
> keycode 52 = period colon
> keycode 53 = minus underscore
84a85
> keycode 86 = less greater backslash backslash
96c97
< keycode 184 = Alt_R Multi_key
---
> keycode 184 = Mode_switch Multi_key





Home | Main Index | Thread Index | Old Index