Emacs: Xah Fly Keys, Create a New Layout

By Xah Lee. Date: .

Create a New Layout

To create a layout, Create a text diagram of your layout. You can make a copy of existing code.

be sure that the text diagram have the same number of keys as the qwerty one.

;; creating a new layout
;; put this in your emacs init.
;; in a position after loading xah-fly-keys

;; create a new layout
;; qwerty with r and t swapped
(puthash "my-qwerty-rt-swapped" "
~ ! @ # $ % ^ & * ( ) _ +
` 1 2 3 4 5 6 7 8 9 0 - =

q w e t r y u i o p [ ] \\
a s d f g h j k l ; '
z x c v b n m , . /

Q W E T R Y U I O P { } |
A S D F G H J K L : \"
Z X C V B N M < > ?
" xah-fly-layout-diagrams)

;; this code can test if u got an error in your diagram
;; (xah-fly-create-key-conv-table
  ;; (gethash "qwerty" xah-fly-layout-diagrams)
  ;; (gethash "my-qwerty-rt-swapped" xah-fly-layout-diagrams))

(xah-fly-keys-set-layout "my-qwerty-rt-swapped")

emacs, Xah Fly Keys, customization