I'd like a minor mode which allows the shifted symbols on the number keys to be accessible in an unshifted fashion (and the digits to then be shifted). It seems this might be helpful with Perl code ($, @, %, etc...). Ideally, there'd be a key for toggling this mode. Sort of like capslock but only for the number keys.
Does such a mode already exist?
One way to roll your own would be something like this:
(define-minor-mode snoopy-mode
"Toggle snoopy mode.
With no argument, this command toggles the mode.
Non-null prefix argument turns on the mode.
Null prefix argument turns off the mode."
;; The initial value.
nil
;; The indicator for the mode line.
" Snoopy"
;; The minor mode bindings.
'(("1" . (lambda () (interactive) (insert-char ?! 1)))
("!" . (lambda () (interactive) (insert-char ?1 1)))
;;etc
))
See minor modes and keymaps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With