Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I may be abusing the word console but I mean the mode without X i.e. pressing ^+Alt F1 and then log as other user where I want to use my chosen layout with USB keyboard.

X works, it configures the new USB keyboard to my choice when I plug it in. But the console keyboard layout is stuck to the setting specified by the kernel. I am trying to change that:

# usbhidctl -f /dev/uhid0 -w keyboard.encoding=us                                       
usbhidctl: Failed to match: keyboard.encoding

Some info about the OpenBSD version:

# uname -rv
4.7 GENERIC.MP#449
share|improve this question
up vote 3 down vote accepted


wsconsctl keyboard.encoding=us


If yes, put that in /etc/wsconsctl.conf to make it persistent.

Or are you saying that that would only work for PS/2 keyboards? Maybe enabling USB legacy keyboard mode in the BIOS would help in that case?

wsconscfg -k

may also be of use.

Perhaps you need to change the device from


to something like



share|improve this answer
...almost downvoting but wsconsctl is not for manipulating usb hid devices. It is the usbhidctl -command. Forgive me if I am wrong but it is my understandig, currently... you may be on the right track. Can you clarify the last point you added? – user2362 Apr 19 '11 at 22:37
@hhh: Your question does not state that assumption. Did you already try wsconscfg -k, usbhidctl -f /dev/wskbd1 ...? – Mikel Apr 19 '11 at 22:38
wscons has supported USB devices since 2001. Did you even try this? – Mikel Apr 19 '11 at 22:41
@Mikel: sorry my question may be misleading but by usb console keybord I mean that I want to get just plugged usb-keyboard working in my specified layout. I tried "-f /dev/uhid0" to manipulate the keyboard, not wskbd1 haven't done such redirection. – user2362 Apr 19 '11 at 22:43
wscons is supposed to support USB keyboards, so I suggest finding the /dev/wskbd<number> that corresponds to your keyboard (or using wsconscfg to create such a device if it does not already exist), then try wsconsctl on it. – Mikel Apr 19 '11 at 22:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.