The Complete Computing Environment

EXWM Input Simulation

(provide 'cce/exwm-input-simulation)

EXWM has many nice features. EXWM can, for example, "re-write" certain keys, which allows me to put C-n C-f C-b C-p to use in normal applications, slightly closer to behaving like Emacs buffers, and keeping my fingers closer to my home row. I expand upon this even further in my Firefox configuration, which integrates evil-mode and simulating input.

(push ?\C-q exwm-input-prefix-keys)
(define-key exwm-mode-map [?\C-q] 'exwm-input-send-next-key)

(setq exwm-input-simulation-keys
  `((,(kbd "C-b") . left)
    (,(kbd "C-f") . right)
    (,(kbd "C-p") . up)
    (,(kbd "C-n") . down)
    (,(kbd "C-a") . home)
    (,(kbd "C-e") . end)
    (,(kbd "M-y") . ,(kbd "C-c"))
    (,(kbd "C-y") . ,(kbd "C-v"))
    (,(kbd "C-M-b") . ,(kbd "C-b"))))

;; i believe this is used for cce/firefox
(push (kbd "<escape>") exwm-input-prefix-keys)