2022-03-28 15:03:21 +02:00
#+title : :input layout
#+subtitle : auie,ctsrnm is the superior home row
#+created : Jun 29, 2020
#+since : 21.12.0
2021-10-16 01:27:36 +02:00
* Description :unfold:
This module provides barebones support for using Doom with non-qwerty keyboard
layouts.
2020-08-14 21:41:25 +02:00
** Maintainers
2021-10-16 01:27:36 +02:00
- [[doom-user: ][@gagbo ]] ([[kbd: ][+bepo ]])
[[doom-contrib-maintainer: ][Become a maintainer? ]]
** Module flags
- +azerty ::
Remap keybinds to accommodate the [[https://en.wikipedia.org/wiki/AZERTY ][Azerty keyboard layout ]].
- +bepo ::
Remap keybinds to accommodate the [[https://en.wikipedia.org/wiki/B%C3%89PO ][BÉPO keyboard layout ]] (version 1.1, in
particular).
** Packages
/This module doesn't install any packages./
** TODO Hacks
#+begin_quote
2023-09-16 20:19:11 +02:00
This module's hacks haven't been documented yet. [[doom-contrib-module: ][Document them? ]]
2021-10-16 01:27:36 +02:00
#+end_quote
2020-08-14 21:41:25 +02:00
2021-10-16 01:27:36 +02:00
** TODO Changelog
# This section will be machine generated. Don't edit it by hand.
/This module does not have a changelog yet./
2020-08-14 21:41:25 +02:00
2021-10-16 01:27:36 +02:00
* Installation
[[id:01cffea4-3329-45e2-a892-95a384ab2338 ][Enable this module in your ~doom!~ block. ]]
2020-08-14 21:41:25 +02:00
2021-10-16 01:27:36 +02:00
/This module has no external requirements./
2020-09-21 10:05:07 +02:00
2021-10-16 01:27:36 +02:00
* TODO Usage
#+begin_quote
2023-09-16 20:19:11 +02:00
/This module's usage documentation is incomplete./ [[doom-contrib-module: ][Complete it? ]]
2021-10-16 01:27:36 +02:00
#+end_quote
2020-08-14 21:41:25 +02:00
** Bépo
Support for the bépo layout includes:
- Setting Avy keys to the correct home row keys
2021-10-16 01:27:36 +02:00
- Changing navigation keys to [[kbd: ][c ]], [[kbd: ][t ]], [[kbd: ][s ]], and [[kbd: ][r ]]
+ old [[kbd: ][t ]] is mapped to [[kbd: ][j ]]
+ old [[kbd: ][s ]] is mapped to [[kbd: ][k ]] (i.e. staging in the magit status buffer is done with
[[kbd: ][k ]])
+ See [[*Configuration ][Configuration ]] to see where old [[kbd: ][c ]] and [[kbd: ][r ]] functions
2020-08-15 11:19:14 +02:00
are remapped
2021-10-16 01:27:36 +02:00
- Bind [[kbd: ][<> ]] functions to [[kbd: ][«» ]] keys when possible
- Bind [[kbd:][[]]] functions to [[kbd: ][() ]] keys when possible (the "unimpaired-like" bindings)
- Bind [[kbd: ][é ]] key to [[kbd: ][w ]] functions when possible
- Bind [[kbd: ][è ]] key to useful functions when possible
- Bind [[kbd: ][`~ ]] functions to [[kbd: ][$# ]] keys when possible
2020-08-14 21:41:25 +02:00
2020-12-10 01:21:25 +01:00
*** Easymotion
2022-09-26 02:19:42 +08:00
If you use [[doom-package:evil-easymotion ]], then all the bindings that were on [[kbd: ][gs ]] have been
2021-10-16 01:27:36 +02:00
moved to [[kbd: ][gé ]].
2020-12-10 01:21:25 +01:00
2021-10-16 01:27:36 +02:00
In short : [[kbd: ][g s j ]] -> [[kbd: ][g é t ]] (~evilem-motion-next-line~ ). And so on.
2020-12-10 01:21:25 +01:00
2020-08-15 11:19:14 +02:00
*** Leaving mnemonics alone when possible
2021-10-16 01:27:36 +02:00
Exchanging [[kbd: ][h ]]/[[kbd:][j]]/ [[kbd: ][k ]]/[[kbd:][l]] to [[kbd:][c]]/ [[kbd: ][t ]]/[[kbd:][s]]/ [[kbd: ][r ]] has the effect of destroying a few mnemonics: the
change operator becomes [[kbd: ][l ]] for example, or the window split becomes [[kbd: ][SPC é k ]].
2020-08-15 11:19:14 +02:00
The module tries to limit those changes to the minimum, especially in special
buffers. A concrete example is magit.
2021-10-16 01:27:36 +02:00
As the =magit: project= buffer (obtained with ~M-x magit-status~ ) does not need
left-right navigation, keys [[kbd: ][c ]], [[kbd: ][r ]], [[kbd: ][h ]], and [[kbd: ][l ]] keep their "expected" bindings, while
[[kbd: ][t ]], [[kbd: ][s ]], [[kbd: ][j ]], and [[kbd: ][k ]] are flipped:
- checking the log from a magit buffer is still on [[kbd: ][l ]]
- staging a file/region has been moved to [[kbd: ][k ]]
2020-08-15 11:19:14 +02:00
*** Possible contributions
2021-10-16 01:27:36 +02:00
**** Avoid [[kbd:][g]] and [[kbd:][z]] to be used too often
2020-08-14 21:41:25 +02:00
A nice addition in the future might be to have all the normal mode bindings that
2021-10-16 01:27:36 +02:00
start with [[kbd: ][g ]] start with [[kbd: ][, ]] instead to avoid the curl on these common bindings.
This is *not* implemented for the time being.
2020-08-14 21:41:25 +02:00
2021-10-16 01:27:36 +02:00
The same thing could be done to [[kbd: ][z ]], potentially using [[kbd: ][à ]] instead.
2021-01-10 14:16:21 +01:00
**** Proper minor mode
2020-09-21 10:05:07 +02:00
Also, implementing all those changes as a minor we could flip on and off would
help with adoption
2021-01-10 14:16:21 +01:00
**** Put "word" text objects to é instead of w
2021-10-16 01:27:36 +02:00
"inside word" and "around word" are [[kbd: ][iw ]] and [[kbd: ][aw ]], which use the very poorly rated [[kbd: ][w ]]
key in the bépo layout. Finding a way to use [[kbd: ][é ]] or even [[kbd: ][è ]] more for these would be
a welcome change
2021-01-10 14:16:21 +01:00
2020-12-10 01:21:25 +01:00
*** Org-mode
2022-09-26 02:19:42 +08:00
[[doom-package:evil-org ]] allows to define ~evil-org-movement-bindings~ to automatically map
2021-10-16 01:27:36 +02:00
movement bindings on non-hjkl keys. It maps automatically keys to [[kbd: ][C-c ]] and [[kbd: ][C-r ]] in
normal and insert states though, and it's not really user friendly in Emacs to
remap those.
2020-12-10 01:21:25 +01:00
2021-10-16 01:27:36 +02:00
Therefore, in ~org-mode~ :
- ~org-shiftright~ is bound to [[kbd: ][C-» ]]
- ~org-shiftleft~ is bound to [[kbd: ][C-« ]]
* TODO Configuration
#+begin_quote
2023-09-16 20:19:11 +02:00
/This module's configuration documentation is incomplete./ [[doom-contrib-module: ][Complete it? ]]
2021-10-16 01:27:36 +02:00
#+end_quote
2020-12-10 01:21:25 +01:00
2020-08-14 21:41:25 +02:00
** Bépo
2021-05-01 00:56:08 -04:00
=+layout-bepo-cr-rotation-style= controls whether:
2020-08-14 21:41:25 +02:00
- =qwerty-c= functions are mapped on =bépo-l= key, and =qwerty-r= functions on
2021-10-16 01:27:36 +02:00
=bépo-h= key (~'ergodis~ ), or
2020-08-14 21:41:25 +02:00
- =qwerty-c= functions are mapped on =bépo-h= key, and =qwerty-r= functions on
2021-10-16 01:27:36 +02:00
=bépo-l= key (~'strict~ )
2021-05-01 00:56:08 -04:00
2021-10-16 01:27:36 +02:00
~'strict~ would be the logical choice but the [[kbd: ][c ]] functions are used more often
than the [[kbd: ][r ]] ones so [[https://bepo.fr/wiki/Vim#Principe ][Ergodis ]] advises to actually put all the [[kbd: ][c ]] functions on the
key that does not need a curl.
2020-08-14 21:41:25 +02:00
* Troubleshooting
2021-10-16 01:27:36 +02:00
[[doom-report: ][Report an issue? ]]
2021-04-14 09:34:27 +02:00
** Outstanding issues (contributions welcome)
*** Bépo
2022-09-26 02:19:42 +08:00
- In [[doom-package:eshell ]], the key [[kbd: ][c ]] is still bound to ~evil-collection-eshell-evil-change~ in
2021-10-16 01:27:36 +02:00
normal mode.
2021-05-01 00:56:08 -04:00
2020-12-10 01:21:25 +01:00
** How to investigate an issue ?
2021-10-16 01:27:36 +02:00
If a key is misbehaving, use ~M-x describe-key~ ([[kbd: ][C-h k ]] or [[kbd: ][SPC h k ]] or [[kbd: ][F1 k ]]) to
see the command bound to the key, and more importantly in which keymap it is
2020-12-10 01:21:25 +01:00
bound.
2021-10-16 01:27:36 +02:00
You should ignore all ~evil-collection-*-backup-map~ keymaps, as they are
artifacts from ~evil-collection-translate-key~ and those maps are actually not
2020-12-10 01:21:25 +01:00
active.
Most likely the solution is to call one of the "key rotation" functions on the
relevant keymaps.
2021-05-01 00:56:08 -04:00
2020-08-14 21:41:25 +02:00
** 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
2021-10-16 01:27:36 +02:00
"get work done". Sadly the only way is to comment out the module, run ~$ doom
sync~ and restart emacs.
2020-08-14 21:41:25 +02:00
2021-10-16 01:27:36 +02:00
Restoring the session [[kbd: ][SPC q l ]] by default helps to lower the impact of the
2020-08-14 21:41:25 +02:00
restart.
2021-10-16 01:27:36 +02:00
* Frequently asked questions
/This module has no FAQs yet./ [[doom-suggest-faq: ][Ask one? ]]
* TODO Appendix
#+begin_quote
2023-09-16 20:19:11 +02:00
This module has no appendix yet. [[doom-contrib-module: ][Write one? ]]
2021-10-16 01:27:36 +02:00
#+end_quote