39 lines
1.3 KiB
Org Mode
39 lines
1.3 KiB
Org Mode
:PROPERTIES:
|
|
:ID: cce/exwm_input_simulation
|
|
:END:
|
|
#+TITLE: EXWM Input Simulation
|
|
#+filetags: :Emacs:CCE:EXWM:
|
|
#+PROPERTY: header-args :mkdirp yes :results none
|
|
#+PROPERTY: header-args:emacs-lisp :tangle exwm-input-simulation.el
|
|
|
|
#+ARROYO_EMACS_MODULE: exwm-input-simulation
|
|
#+ARROYO_MODULE_WANTS: cce/exwm.org
|
|
|
|
#+ARCOLOGY_KEY: cce/exwm-input-simulation
|
|
#+ARCOLOGY_ALLOW_CRAWL: t
|
|
|
|
#+begin_src emacs-lisp
|
|
(provide 'cce/exwm-input-simulation)
|
|
#+end_src
|
|
|
|
[[id:cce/exwm][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.
|
|
|
|
#+begin_src emacs-lisp
|
|
(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)
|
|
#+end_src
|