:input layout

auie,ctsrnm is the superior home row

1. Description

This module provides barebones support for using Doom with non-qwerty layouts.

1.2. Module flags

Remap keybinds to accommodate the Azerty keyboard layout.
Remap keybinds to accommodate the BÉPO keyboard layout (version 1.1, in particualr).

1.3. Packages

This module doesn’t install any packages.

1.4. Hacks

No hacks documented for this module.

2. Prerequisites

This module requires :editor evil +everywhere if you use Evil (it requires evil-collection to remap keys).

This module has no external prerequisites for non-evil users.

3. Usage

3.1. Bépo

Support for the bépo layout includes:

  • Setting Avy keys to the correct home row keys.
  • Remapping navigation keys to c, t, s, and r.
    • Remap t to j.
    • Remap s to k (i.e. staging in the magit status buffer is done with k).
    • See Configuration to see where old c and r functions are remapped.
  • Remap < and > to « and » where possible.
  • Remap [ and ]​ to ( and ) where possible (the “unimpaired-like” bindings).
  • Remap é to w functions where possible.
  • Remap è to useful functions where possible.
  • Remap ` and ~ to $ and # keys where possible.

3.1.1. Easymotion

If you use evil-easymotion, then all the bindings that were on gs have been moved to .

In short: g s j -> g é t (evilem-motion-next-line) and so on.

3.1.2. Leaving mnemonics alone when possible

Exchanging hjkl to ctsr has the effect of destroying a few mnemonics: the change operator becomes l for example, or the window split becomes SPC é k.

The module tries to limit those changes to the minimum, especially in special buffers. A concrete example is magit.

As the magit: project buffer (obtained with magit-status) does not need left-right navigation, keys c, r, h, and l keep their “expected” bindings, while t, s, j, and k are flipped:

  • Checking the log from a magit buffer is still on l.
  • Staging a file/region has been moved to k.

3.1.3. Possible contributions Avoid g and z to be used too often

A nice addition in the future might be to have all the normal mode bindings that start with g start with , instead to avoid the curl on these common bindings. This is not implemented for the time being.

The same thing could be done to z, potentially using à instead. Proper minor mode

Also, implementing all those changes as a minor we could flip on and off would help with adoption Put “word” text objects to é instead of w

“inside word” and “around word” are iw and aw, which use the very poorly rated w key in the bépo layout. Finding a way to use é or even è more for these would be a welcome change

3.1.4. Org-mode

evil-org allows to define evil-org-movement-bindings to automatically map movement bindings on non-hjkl keys. It maps automatically keys to C-c and C-r in normal and insert states though, and it’s not really user friendly in Emacs to remap those.

Therefore, in org-mode:

  • org-shiftright is bound to C-»
  • org-shiftleft is bound to C-«

4. Configuration

4.1. Bépo

+layout-bepo-cr-rotation-style controls whether:

  • qwerty-c functions are mapped on bépo-l key, and qwerty-r functions on bépo-h key ('ergodis), or
  • qwerty-c functions are mapped on bépo-h key, and qwerty-r functions on bépo-l key ('strict)

'strict would be the logical choice but the c functions are used more often than the r ones so Ergodis advises to actually put all the c functions on the key that does not need a curl.

5. Troubleshooting

5.1. Outstanding issues (contributions welcome)

5.1.1. Bépo

  • In eshell, the key c is still bound to evil-collection-eshell-evil-change in normal mode.

5.2. How to investigate an issue ?

If a key is misbehaving, use describe-key (<help> k) to see the functions bound to the key, and more importantly in which map it is bound.

You should ignore all evil-collection-*-backup-map keymaps, as they are artifacts from evil-collection-translate-key and those maps are actually not active.

Most likely the solution is to call one of the “key rotation” functions on the relevant keymaps.

5.3. How to deactivate the new bindings and go back to the old ones ?

If you are learning a new layout you might want to go back to tho old one to “get work done”. Sadly the only way is to comment out the module, run $ doom sync and restart emacs.

Restoring the session <leader> q l by default helps to lower the impact of the restart.

6. TODO Appendix

This module has no appendix yet. Write one?