On Fri, 26 Dec 2014, Eduardo Lopes wrote:
> Hello folks!
>
> May someone point to me how do I can obtain, in the console, the keycode of
> any particular key, in OpenBSD?
There is no easy way. If you are intrested in unmapped keys you could use
the following script to map all unmapped characters.
#!/bin/ksh
jot 255 1 |
while read i; do
str=`wsconsctl keyboard.map | grep "^keycode ${i} = "`
if [ "$str" = "" ]; then
j=`printf "%03d" $i`
d0=${j%[0-9][0-9]}
k=${j#[0-9]}
d1=${k%[0-9]}
d2=${j#[0-9][0-9]}
`wsconsctl keyboard.map+="keycode $j = $d0 $d1 $d2 at"`
echo $s
fi
done
If you test a previously unmapped key unshifted shifted and alt gr
you should get tree digits which would be the decimal keycode of that
key.
if you dump keyboard.map after the script has been executed you should
find lines like
keycode 96 = 0 9 6 at
-moj
> thanks
>
> Eduardo Lopes.