SSD Nodes Learn Hosting plans →
How to do am Matt ConnorBy Matt Connor · Updated 2026-08-29

How to Switch to Colemak on Linux Without Wahala

Set Colemak for Linux console, X11, or Wayland, see why SSH no need keyboard layout, and know how the switch affects Vim hjkl and Ctrl shortcuts.

Colemak layout dey live for where on Linux

Colemak for Linux no be one system-wide setting. The layer wey dey read keyboard at that moment na im 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, e go look like say nothing happen.

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

The remaining part of this guide cover the three software layers, why remote server almost never need any of dem, and wetin the switch change for Vim and your terminal shortcuts.

Check wetin your system already get

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

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 fit no get am. As of August 2026, Ubuntu 24.04 and Debian 13 both dey 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 or Colemak-DH

Colemak dey move seventeen keys from where dem dey for QWERTY, but e leave ten untouched, including Z, X, C and V. So shortcuts for undo, cut, copy and paste still dey where your left hand expect dem. Na this compatibility make the layout get this kind shape.

Colemak-DH na modification of Colemak. E move D, B and G, then 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 with Colemak and move go DH face small change, no be completely new layout. The XKB variant na colemak_dh, while colemak_dh_iso dey for keyboards wey get extra key beside the left shift.

If you dey come from QWERTY, either one na one relearning work, so choose the one wey comfortable and stop there. To switch layout for second time cost almost as much as the first one, because wetin you dey rebuild na motor memory wey key positions tie to. If the question still be whether to leave QWERTY at all, settle am with how Colemak, Dvorak and QWERTY dey compare before you spend one month rebuilding that motor memory.

Set Colemak for X11 with setxkbmap and localectl

setxkbmap us -variant colemak
setxkbmap -query

setxkbmap -query suppose report variant: colemak now, and when you type for any window, e go produce Colemak letters. This change go last as long as the X session last, and e no write anything for disk. Na safe way to test the layout for one hour.

To make e 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 also dey convert the choice to the nearest console keymap unless you add --no-convert. So for many systems, this one command go 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 like e no work there: e fit fail to find display, or e fit change only XWayland, while your native Wayland applications ignore am.

For GNOME, setting dey inside one gsettings key:

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

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

For sway, put am inside ~/.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.

Colemak set for text console

Console na the 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 one 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 the console to confirm. console-setup dey convert this XKB description to console keymap with ckbcomp. So, for these systems, console and X dey use the same description.

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

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

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

sudo loadkeys en-latin9 go change the current console immediately, and sudo loadkeys us go 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 e reason dey important to understand. SSH dey carry characters, no be key positions. Your terminal emulator dey receive the key press, your local layout dey turn am into character, and na only that character dey travel through the connection. The server dey receive n, but e no get way to know which physical key produce am. So the layout wey you set for your laptop dey follow you enter every SSH session, enter tmux, and enter every editor wey you run remotely. The 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 server fleet, 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.

Two exceptions dey worth planning for. The first one na console wey connect directly to the machine. Browser console for provider panel normally dey present itself to the virtual machine as keyboard. So key presses dey arrive as scancodes, and the server own console keymap decide which character go appear. Na the only place where layout wey you set for the server go take effect. Na also your rescue path when SSH stop to work. So console keymap wey you leave half-finished 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 a box wey other people dey log into, e go change for dem too, and dem no go know why.

Vim hjkl keys go happen

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 the cursor keys dey spread across three rows instead of sitting under four fingers.

Two workable answers dey, and people dey use both.

Keep the default settings and learn the new positions again. Nothing else for your setup go spoil, 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, for 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 already dey move left. The last two lines restore the commands wey you move: l starts insert mode, and k repeats the last search. Give the uppercase keys the same treatment, otherwise Shift plus a 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 only to normal mode, 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 expect the default keys fit behave strangely with am.

Any one wey you choose, choose am once. If you abandon a remap after one month, e go cost you another month.

Wetin dey happen to terminal shortcuts

Terminal control code dey come from the character, no be 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 deliberately leave Z, X, C and V for the same places wey dem dey for QWERTY.

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

tmux still dey use the default prefix, because B no move for Colemak. For Colemak-DH, B move go top row and the prefix follow am. Na this be the first thing you go notice if you keep one long-running tmux session for VPS. You fit rebind the prefix to any key wey you like with one-line change. E easier pass to retrain the same reflex 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 remap function keys.

How long the switch go cost you

Nobody fit give you 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 report—and these na practice logs wey dem report by themselves, no be controlled measurement—be say for the first week, their speed dey far below half of the old speed. Dem dey return to the old speed somewhere between one and three months of daily use. The difference between people wide, so treat these figures as general pattern, no be fixed schedule.

Two habits fit make the process slower. If you dey switch 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 when time dey press you. This one go train you to look down at the keys.

Set up the 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 undo the persistent setting, run sudo localectl set-x11-keymap us.

Toggle dey 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, while the second one no get variant. 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 dem need separate attention. Login greeter dey start before your session settings apply. Test am by logging out instead of trusting the setting. If disk dey encrypted, passphrase prompt dey run from initramfs, and initramfs 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.

Wetin make I keep one program for QWERTY?

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

Two methods dey work. The first one na per device. If na separate keyboard dey use for 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 dey accept the same settings for each input identifier from swaymsg -t get_inputs, and more specific selector go override type:keyboard.

The second method na to do the remap inside the application, like Vim langmap dey do. Almost every game get key binding screen. Rebind movement keys there; e 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 the program.

FAQ

I need set Colemak for my VPS?

No, if na SSH you dey use take reach am. SSH dey carry characters, so your laptop go resolve the layout before e send anything, and the server go receive the same bytes wey QWERTY typist go send. The exception na browser console for your provider panel. E dey connect to the virtual machine as keyboard and e dey use the server 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 need 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 next to the left shift. Run localectl list-x11-keymap-variants us | grep colemak to see the ones wey your system get.

Wetin happen to Vim hjkl keys for Colemak?

h remain where e dey. j move under QWERTY Y, k under QWERTY N, and l under QWERTY U, so the cursor keys spread across three rows. You fit relearn dem where dem land, and this go keep every plugin and tutorial valid. Or you fit 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 langmap option dey do the same work for normal mode, but e no apply to Ctrl combinations and e fit confuse plugin mappings.

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

Expect weeks, no be days, because na motor memory and practice na the only input. Practice logs wey users report commonly describe say the first week dey far below half the old speed, and say dem return to am 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, the compositor dey control the keymap and push am to every application, so setxkbmap either no fit find a display or e only change XWayland, while 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 System Settings.