Just call the :define-key
method from a keymap object, and pass the command's name with its arguments in a tuple:
(def keymap (:new-keymap (in jwno/context :key-manager))) # Create a new keymap
(:define-key keymap "Win + ," [:split-frame :horizontal 2]
"Split current frame horizontally")
Here :split-frame
is the name of our command. :horizontal
and 2
are its arguments. If a command takes no argument, you can pass only the name, without putting it in a tuple:
(:define-key keymap "Win + Shift + Q" :quit
"Tell Jwno to exit")
The code above is equivalent to:
(:define-key keymap "Win + Shift + Q" [:quit]
"Tell Jwno to exit")