Created
January 7, 2018 16:37
-
-
Save gcentauri/7d0191311963802bd7847406b8aeb05d to your computer and use it in GitHub Desktop.
redefining xah command mode keys
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun my-command-mode () | |
(define-key xah-fly-key-map (kbd "p") nil) | |
;; (define-key xah-fly-key-map ...) | |
;; ... | |
) | |
(add-hook 'xah-fly-command-mode-activate-hook 'my-command-mode) |
What is the form of that argument that I am setting to nil
?
from the documentation on define-key
:
DEF is anything that can be a key’s definition:
nil (means key is undefined in this keymap),
a command (a Lisp function suitable for interactive calling),
a string (treated as a keyboard macro),
a keymap (to define a prefix key),
a symbol (when the key is looked up, the symbol will stand for its
function definition, which should at that time be one of the above,
or another symbol whose function definition is used, etc.),
a cons (STRING . DEFN), meaning that DEFN is the definition
(DEFN should be a valid definition in its own right),
or a cons (MAP . CHAR), meaning use definition of CHAR in keymap MAP,
or an extended menu item definition.
(See info node ‘(elisp)Extended Menu Items’.)
It seems like what I want is to define a command that doesn't do anything.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ahh Excellent. Maybe I'll give it a try now.