Hi,
On one of my devices, I would like to change my Meta modifier so that it uses keycode 68 instead of keysym Alt because for other reasons specific to the setup on that device, Alt and AltGr are not distinguished (yet they have different keycodes). I know Nyxt supports mapping keycodes, but I am new to it and to Lisp, meaning I’m right in the steepest part of the learning curve right now.
My understanding is I need a ~/.nyxt/init.lisp
file for my custom settings. I looked at the example given in the modifier-translater (gtk-browser)
slot and came up with this:
(defun my-translate-modifiers (modifier-state &optional event)
"Replace Alt by keycode 64"
(declare (ignore event))
(let ((plist '(:mod1-mask "64")))
(delete nil (mapcar (lambda (mod) (getf plist mod)) modifier-state))))
From there, three questions:
- Would that be the correct way to do it?
- Do I also need to explicitly describe other modifier, or can I just do the above and assume that Nyxt will use the default values for the other modifiers?
- What is the exact way to set individual keybindings for given command? Can I for instance merge all changes in a single code chunk for several keybindings, or would that be a different code block for each keybinding, e.g. copy the Lisp code found in
describe-key (C-h k)
followed by a keybinding, paste it in myinit.lisp
and edit just the keybinding line, for each custom change?
Thanks a lot for this browser!