I've got some games running in Wine, but I can't figure out how to change the keyboard layout. By default, I use the dvorak layout in Ubuntu, which isn't very friendly for most games. I can change it back to QWERTY in Ubuntu, but when I fire up a game, it stays with my default dvorak. How can I change to QWERTY inside my wine application?

4 Answers 4


A lot of wine programs use the X keyboard layout instead of the window manager's layout. You have to change it by running

setxkbmap us

Then change back with

setxkbmap us dvorak

In case someone has multiple keyboard layouts - this solution worked for me.

I have two keyboard layouts: English (us) and Ukrainian (uk). The first one was set as default in system settings. However, in Wine games the letter keys (q,w,e,r,t,y,etc.) didn't work at all.

Based on Alex's answer, I found the way to determine my current X keyboard layout settings:

setxkbmap -v

It showed me the following:

Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwerty)
types:      complete+numpad(microsoft)
compat:     complete
symbols:    pc+ua+us:2+inet(evdev)+group(alt_shift_toggle)
geometry:   pc(pc101)

I noticed that the symbols line has ua (not us) on the first place. Assuming that Wine always uses the first specified layout, I just needed to change the layout precedence:

setxkbmap us,ua

And it worked. However, after reboot it was reset back to its default state. Thus, I have to do it each time after boot. I'll try to find a way to store those settings by default.

  • You can add it to your .profile or .bashrc
    – Sharcoux
    Sep 29, 2020 at 22:53

Who use different keyboard layouts just need open settings on ubuntu -> language settings and plase English layout top on list. P.S. I'm sorry, I did it on gui, dont know terminal command ;-)

  • If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context. Sep 1, 2021 at 13:18

In the keyboard control panel, you can configure multiple keyboard layouts from the Layouts tab. Click on Options... and expand the Key(s) to change layout section. Pick the key combo you prefer and you should have an easy way to switch layouts.

If the Separate layout for each window checkbox is checked in the main keyboard control panel, then each window should remember which layout they are using separately rather than it being a global setting.

  • Where do I find the keyboard control panel? I tried "wine control" for the wine control panel, but it's not in there. Apr 12, 2011 at 16:14
  • This isn't a Wine specific control panel. Pick System -> Preferences -> Keyboard. Apr 12, 2011 at 23:54
  • 3
    Oh. Yeah, I've already got that down. It doesn't apply within a Wine application though. I guess I have to change my default entirely? That's a bit annoying. Apr 13, 2011 at 0:03
  • Really? I just tried it with Wine's Notepad application. I added both US and US Dvorak layouts and set the layout switch combo to ctrl+shift. The ctrl+shift combo successfully changed how my input was interpreted by Notepad. Apr 13, 2011 at 0:15
  • 2
    Crazy... yeah, it works for notepad, just not the game I'm playing ("Within a Deep Forest"). Odd. Apr 13, 2011 at 17:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .