I'm using the dvorak keyboard, but the doom-emacs is for vimers, do you have any idea how to exchange the 'HJKL' and 'DHTN'.
I'm afraid I haven't even considered other keyboard layouts. Would something like https://github.com/yangchenyun/programmer-dvorak cut it?
I'd just like to input that I exclusively use dvorak with unmodified vim bindings and it works great. JK are right next to each other and H and L are to the left and right respectively. Of course this is not a solution and I do not mean to hinder this investigation.
I took a stab at this last year when I was experimenting with Colemak. While it's possible, it's rather involved.
I too use dvorak with normal qwerty vim bindings.
I did change TWO things though:
avy-keys to the dvorak home row is nice.lisp
(setq avy-keys '(?a ?o ?e ?u ?i ?d ?h ?t ?n ?s))
aw-keys.lisp
(after! quail
(add-to-list 'quail-keyboard-layout-alist
`("dvorak" . ,(concat " "
" 1!2@3#4$5%6^7&8*9(0)[{]}`~ "
" '\",<.>pPyYfFgGcCrRlL/?=+ "
" aAoOeEuUiIdDhHtTnNsS-_\\| "
" ;:qQjJkKxXbBmMwWvVzZ "
" "))))
(quail-set-keyboard-layout "dvorak")
avy-keys is also fine, and leaving everything as-is also.evil-collection-translate-key and/or general-translate-key should make alternative layouts fairly easy from a technical POV. At least, they allow you to apply keymap transformations to automatically get your preferred evil bindings everywhere. The hard part is manually adjusting all the edge cases that will pop up afterwards. Before switching to Doom Emacs, I did this in my home-grown Emacs config for the Workman layout.
EDIT: Check it out here.
I need to type cedilla in a us-intl qwerty keyboard. I was surprised not to find this input-method in Doom. Could you add this or tell me how to add this? Is there a package to add input-methods to Doom?
I found a way to type cedilla.
"LANG=C emacs &"
:)
One note for ace-window: as C-x o is the typical way to invoke this (all in the left hand), you may want to set aw-keys to _only_ the right hand, i.e.
(setq aw-keys '(?h ?t ?n ?s ?g ?c ?r ?l ?d ?f ?b ?m ?w))
or some variant thereof, wherever you set this in your config (using after! or use-package!).
C-x ois the typical way to invoke this
I use C-w C-w, I thought that was the regular (evil-mode?) way.
Oh whoops you're right. C-x o is the non-Doom way to do it in emacs, and you definitely want the shortcut keys you configured when doing the evil/vim way.
A possible intermediate proposal:
I use Tridactyl, so I am used to j k for up and down navigation in that context. But h and l are pretty awkward in a Dvorak layout, not to mention unfamiliar! Could the bindings for these keys simply be swapped with m and w?
(I.e., these keys are symmetrical to j k on the Dvorak keyboard.)
Presumably this could just be something individual users could do in their config files easily enough... Like this seems to work for me:
(use-package! general)
;; default binding of "h" → now obtained by "m"
;; default binding of "m"→ not obtained by "l"
(general-define-key
:states 'normal
"m" 'evil-backward-char
"l" 'evil-set-marker)
;; default binding of "l"→now obtained by "w"
;; default binding of "w"→now obtained by "h"
(general-define-key
:states 'normal
"w" 'evil-forward-char
"h" 'evil-forward-word-begin)
I think that designing complex configs for multiple keyboard layouts on a case by case basis is a problematic solution. There are over a dozen "major" keyboard layouts for English typing, but almost all of them only adapt alphabet keys and a handful of symbols. Whereas any user of an optimized 40% or 30% keyboard will have their own non-standard numerical and symbol key arrangement even if they type QWERTY, so making keyboard layout presets to support the majority of ergonomics-critical users is totally impossible. Even if you make presets for Dvorak, Capewell Dvorak, Workman, Colemak, Colemak-DH, Colemak DHm, Arensito, Mtgap 3.0, CarpleX's unpronounceable thing, Qwickly, Minimak, Hands Down, Halmak, and Norman, I would guess you have only 80%ish of non-Qwerty typists covered.
Instead, I think it is more sensible to abstract keybindings spacially rather than basing it on keycodes. Instead of binding a command to "a" in evil-bindings.el, or in some other file, bind that command to __LPinkyHomerow, and let the user define what keycode __LPinkyHomerow means to them in some dedicated keymap.el file. This would allow users to add their own layout very very easily and safely. There's nothing wrong with making some presets for common layouts such as Dvorak (Programmer Dvorak, mentioned above, happens to be how I type this!), but if supporting ergonomic keyboard layouts is a goal of Doom Emacs, a more thorough and scalable solution would be very helpful imo.
Most helpful comment
I'd just like to input that I exclusively use dvorak with unmodified vim bindings and it works great. JK are right next to each other and H and L are to the left and right respectively. Of course this is not a solution and I do not mean to hinder this investigation.