SSD Nodes Learn 🎉 VPS from $5.50/mo
How to do am Matt ConnorBy Matt Connor · Updated 2026-08-13

How to Set Colemak for Linux Console, X11 and Wayland

Learn how to set Colemak for Linux console, X11 and Wayland, why SSH needs no layout, plus wetin happens to Vim hjkl and Ctrl shortcuts.

Colemak layout dey live for where on Linux

Colemak for Linux no be one setting wey cover the whole system. Na the thing wey dey read keyboard at that time go apply the layout, so e dey one of three places: text console, X11 server, or your Wayland compositor. If you set am for wrong place, nothing go happen.

One fourth option dey wey bypass operating system completely. Keyboard wey fit remap for im own firmware, like board wey dey run QMK or VIA, go send the codes for the letters wey you want. So every machine wey you plug am into go type Colemak without any configuration, including server console and machine wey no belong to you. The disadvantage be say your laptop keyboard still go type QWERTY.

The rest of this guide go cover the three software layers, why remote server almost never need any of dem, and wetin the switch go do to Vim and your terminal shortcuts.

Check wetin your system already get

Run these commands before you change anything. Dem go print the current setting and the list of Colemak variants wey your X keyboard database get.

localectl status
setxkbmap -query
localectl list-x11-keymap-variants us | grep colemak

The last command suppose print colemak and colemak_dh. Colemak don dey inside xkeyboard-config for years. Colemak-DH enter for version 2.34, so na only old release go miss am. As of August 2026, Ubuntu 24.04 and Debian 13 both ship newer version pass that one.

If setxkbmap -query report say e no fit open display, you dey inside Wayland session and compositor dey control the layout. That case get im own section below.

Colemak o Colemak-DH

Colemak dey move seventeen keys comot from dia QWERTY positions and e leave ten for dia original place, including Z, X, C and V. So undo, cut, copy and paste shortcuts still dey where your left hand expect dem. Na this compatibility make the layout look as e be.

Colemak-DH na modification of Colemak. E move D, B and G go different positions, and e swap H with M, because plain Colemak make you type both D and H by stretching one index finger reach the middle column of the keyboard. The official mod keep every letter for the same finger wey use am for Colemak. So person wey dey type Colemak and move go DH go face small change, no be completely new layout. The XKB variant na colemak_dh, with colemak_dh_iso for keyboards wey get the extra key beside the left shift.

If you dey come from QWERTY, either one na one relearning work. Choose the one wey comfortable and stay with am. Switching layout again later go cost almost the same as the first one, because wetin you dey rebuild na motor memory wey tie to key positions.

Set Colemak for X11 with setxkbmap and localectl

setxkbmap us -variant colemak
setxkbmap -query

setxkbmap -query suppose don report variant: colemak now, and typing for any window suppose produce Colemak letters. This change go last as long as the X session dey active, and e no write anything to disk. That one make am safe way to test the layout for one hour.

To make am remain after reboot:

sudo localectl set-x11-keymap us pc105 colemak
localectl status

The argument order na layout, then model, then variant. localectl status suppose show X11 Layout: us and X11 Variant: colemak now. localectl dey also convert the choice to the closest console keymap unless you add --no-convert. So for many systems, this one command fit cover the tty too. For Debian and Ubuntu, check /etc/default/keyboard afterwards, because na that file console-setup dey read when system boot.

Set Colemak for Wayland

Wayland session no get X server wey you fit configure. Compositor dey load keymap and hand am over to each application, so layout na compositor setting. Na why setxkbmap dey look broken for there: e fit fail to find display, or e fit change only XWayland, while your native Wayland applications ignore am.

For GNOME, the setting na one gsettings key:

gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'us+colemak')]"

E dey apply immediately; you no need logout. The string us+colemak na the layout and variant wey join with plus sign.

For sway, put am for ~/.config/sway/config:

input type:keyboard {
    xkb_layout us
    xkb_variant colemak_dh
}

Reload with swaymsg reload. swaymsg -t get_inputs go list every input device together with the layout wey e dey use. Run this check when na only one keyboard dey misbehave.

For KDE Plasma, open System Settings, then Keyboard, then Layouts, and add English (US) with the Colemak variant.

Set Colemak for text console

Console na plain-text tty wey you reach with Ctrl+Alt+F3, and e get im own keymap. Anything wey you set for X11 or compositor no go reach am. This matter if you dey work with terminal workbench for bare virtual console.

For Debian and Ubuntu, edit /etc/default/keyboard:

XKBMODEL="pc105"
XKBLAYOUT="us"
XKBVARIANT="colemak"
XKBOPTIONS=""

Then apply am:

sudo setupcon

Type for console to confirm. console-setup dey convert this XKB description to console keymap with ckbcomp, so console and X dey use the same description for these systems.

For distributions wey dey use kbd keymaps directly, first ask for the name:

localectl list-keymaps | grep -i -e colemak -e latin9
sudo localectl set-keymap en-latin9

kbd package dey ship Colemak console map as i386/colemak/en-latin9. So, the name wey you normally pass na en-latin9, no be colemak. Pass name wey dey inside the list, because system go reject name wey no exist.

sudo loadkeys en-latin9 dey change the current console immediately, while sudo loadkeys us dey restore am. Treat loadkeys as test, no be permanent configuration. E go last until reboot. For Debian and Ubuntu, boot-time setupcon run go restore wetin /etc/default/keyboard talk.

Headless VPS need Colemak layout?

Almost never, and the reason matter make you understand am. SSH dey carry characters, no be key positions. Your terminal emulator dey receive the key press, your local layout turn am to character, and na only that character dey travel through the connection. Server receive n, but e no fit know which physical key produce am. So the layout wey you set for your laptop follow you enter every SSH session, enter tmux, and enter every editor wey you run remotely. Remote machine no need any keyboard configuration at all.

Remember this before you start to edit keyboard files for production boxes. If you manage Linux servers plenty, the layout belong to the machine wey dey in front of you, no be the fleet. So e no get place for your provisioning. The first ten minutes for new VPS get more useful work pass this one.

Two exceptions dey worth planning for. The first one na console wey connect directly to the machine. Browser console for provider panel usually present itself to virtual machine as keyboard. So key presses dey arrive as scancodes, and the server own console keymap decide which character go show. Na the only place where layout wey you set for server go take effect. Na also your rescue path when SSH stop working. So half-finished console keymap for there na real risk.

Serial console dey behave differently because e dey carry characters, and your local layout dey apply. The second exception na shared machine. Console keymap dey affect the whole system. So if you set Colemak for box wey other people dey log into, e go change am for dem too, and dem no go know why.

Vim hjkl keys dey do wetin

For Colemak, h no dey move. The other three dey move. j dey under QWERTY Y, k dey under QWERTY N, and l dey under QWERTY U, so cursor keys dey spread across three rows instead of sitting under four fingers.

Two workable answers dey, and real users dey use both.

Keep the defaults and relearn the positions. Nothing else for your setup go break, every plugin go continue to work, and every Vim tip wey anybody write still go apply to you exactly as dem write am.

Or remap the four keys wey dey under your right hand where hjkl dey before. For Colemak, those keys give h, n, e and i. For Colemak-DH, the same four physical keys give m, n, e and i, because DH swap H with M.

noremap n j
noremap e k
noremap i l
noremap l i
noremap k n

n now dey move down, e dey move up, i dey move right, and h don already dey move left. The last two lines return the commands wey you displace: l starts insert mode, and k repeats the last search. Give the capital letters the same treatment, or Shift plus cursor key fit surprise you.

Vim's langmap option dey do similar work with fewer lines:

set langmap=nj,ek,il,li,kn

Each pair mean the character wey you type followed by the character wey Vim suppose act on. E apply to normal mode only, so insert mode still dey type Colemak text normally. Vim own help document two limits: langmap no apply to Ctrl or Alt combinations, and plugin mappings wey dem write for the default keys fit behave strangely with am.

Any one wey you choose, choose am once. Remap wey you abandon after one month go cost you another month.

Wetin happen to terminal shortcuts

Terminal control code dey come from the character, no be from the physical key. So every Ctrl shortcut dey move together with the layout. Ctrl+C, Ctrl+Z, Ctrl+X and Ctrl+V keep their positions, because Colemak intentionally leave Z, X, C and V for where QWERTY get dem.

Four shortcuts wey you dey use every day dey move. Ctrl+D, wey dey end input, don move go where QWERTY get G. Ctrl+R, wey dey search history, dey where QWERTY get S. Ctrl+E, wey dey go end of line, dey where QWERTY get K. Ctrl+U, wey dey clear the line, dey where QWERTY get I.

tmux keep e default prefix, because B no move for Colemak. For Colemak-DH, B move go top row and the prefix move follow am. Na this be the first thing wey you go notice if you keep tmux session wey dey run for long time for VPS. You fit rebind the prefix to any key wey you like with one line. E easier pass to train the same reflex again two times.

Desktop shortcuts follow the same rule. Binding for Super+E dey move with the layout, because character define am. Binding for Super+F1 stay for the same place, because layout no dey remap function keys.

Wetin this switch go cost you

Nobody fit give you one exact number for your hands. Touch typing na motor memory. You no dey learn where the letters dey; you dey rebuild the reflex wey turns word into finger sequence. So, na only time wey you spend typing fit help.

Wetin people dey report—and these na practice logs wey dem record by themselves, no be controlled measurement—na say for the first week, their speed dey far below half of the old speed. Dem dey return to the old speed sometime between one and three months of daily use. Difference between people wide, so treat these figures as general pattern, no be fixed schedule.

Two habits fit make am slower. If you dey alternate between QWERTY and Colemak during the day, both reflexes go remain weak. Na why most people wey complete the switch dey use the new layout fully for their main machine. If you start during busy week, you go type badly under time pressure, and this go train you to look down at the keys.

Set up your way back before you need am. The time wey you go want QWERTY again na usually when something don break and person dey wait for you.

How to switch back to QWERTY quickly

For X11, setxkbmap us go restore QWERTY immediately. For console, sudo loadkeys us dey do the same thing. To cancel the persistent setting, run sudo localectl set-x11-keymap us.

Toggle better pass command wey you must type for layout wey you never fit type yet:

setxkbmap -layout us,us -variant colemak, -option grp:win_space_toggle

This one load Colemak as the first layout and plain US as the second one, and Super+Space dey switch between dem. The comma for end of colemak, no be typo: e give the first layout the colemak variant and give the second layout none. For GNOME, add both input sources for Settings, where Super+Space already dey switch between dem.

Two password prompts dey outside your desktop session, so you need handle dem separately. Login greeter dey start before your session settings apply, so test am by logging out instead of trusting the setting. If disk get encryption, passphrase prompt dey run from initramfs, and e get its own copy of the keymap. For Debian and Ubuntu, rebuild am with sudo update-initramfs -u after you change /etc/default/keyboard, then reboot once to test while you still get another way to enter the machine.

Kain I keep one program for QWERTY?

The layout dey apply before application see the key. X server or compositor dey turn scancode to character and hand over the character, so application no fit ask for different layout. E fit only remap wetin e receive. Na why the Vim fix dey inside Vim config, and why no general per-window layout switch dey available.

Two approaches dey work. The first one na per device. If na separate keyboard dey handle QWERTY typing, set the layout for that device instead of the whole system:

xinput list
setxkbmap -device 12 -layout us

Take the id from xinput list, then confirm am by typing for each keyboard one after another. sway accepts the same settings per input identifier from swaymsg -t get_inputs, and selector wey more specific go override type:keyboard.

The second approach na to do the remap inside the application, like Vim's langmap. Games almost always get key binding screen, and rebinding movement keys there go take less time than trying to control the layout from outside. For anything wey no get this option, bind the layout toggle above and press am before you launch.

FAQ

I need set Colemak for my VPS?

No, if you dey access am through SSH. SSH dey carry characters, so your layout don resolve for your laptop before anything send, and the server dey receive the same bytes wey QWERTY typist go send. The exception na the browser console for your provider's panel, wey dey connect to the virtual machine as keyboard and dey use the server's own console keymap. That console na your rescue path when SSH fail, so change am only if you sure, and test am while SSH still dey work.

I suppose learn Colemak or Colemak-DH?

Both na one relearning work from QWERTY, so choose based on comfort, no be migration cost. Colemak-DH dey move D, B and G, and swap H with M, because plain Colemak dey type D and H with index-finger stretch enter the middle column. The XKB variant names na colemak and colemak_dh, with colemak_dh_iso for keyboards wey get the extra key beside left shift. Run localectl list-x11-keymap-variants us | grep colemak to see the ones wey your system dey offer.

Wetin happen to Vim's hjkl keys for Colemak?

h remain where e dey. j move under QWERTY's Y, k under QWERTY's N, and l under QWERTY's U, so the cursor keys spread across three rows. You fit relearn dem where dem land, wey go keep every plugin and tutorial valid, or remap the four keys under your right hand: h, n, e and i for Colemak, and m, n, e and i for Colemak-DH. Vim's langmap option dey do the same work for normal mode, though e no apply to Ctrl combinations and e fit confuse plugin mappings.

How long before I fit type again at my old speed?

Expect weeks instead of days, because na motor memory and practice na the only input. Self-reported practice logs commonly describe first week wey dey far below half the old speed, and return to that speed after one to three months of daily use. If you dey alternate between QWERTY and Colemak every day, e go take longer, because neither reflex get chance settle.

Why setxkbmap no do anything for my desktop?

Almost certainly because the session na Wayland. Under Wayland, compositor dey control the keymap and push am to each application, so setxkbmap either no fit find display or e change XWayland only, and native applications ignore am. Set the layout for the compositor instead: the org.gnome.desktop.input-sources gsettings key for GNOME, xkb_variant for the sway config, or the Layouts page inside KDE Plasma's System Settings.