translate SPC to APPS in some modes only
Alan Schmitt
alan.schmitt at polytechnique.org
Thu Feb 11 10:12:34 CET 2016
Hello,
I’m trying the following, to translate the space key to an apps key in
motion, normal, and visual modes:
#+begin_src emacs-lisp
(define-key input-decode-map (kbd "SPC")
(lambda (prompt)
(if (and (not (evil-operator-state-p))
(not (evil-replace-state-p))
(or (evil-motion-state-p) (evil-normal-state-p) (evil-visual-state-p)))
(kbd "<apps>")
(kbd "SPC"))))
#+end_src
It works well, with one exception: the part that checks if the current
state is not the operator nor replace state does not seem to work. For
instance, if I type r <SPC> in normal mode the current character is not
replaced, and I see in the minibuffer that further input is needed (apps
is a prefix key here). This also happens when I want to search for
a string using '/': I no longer can enter a space.
Is this way to detect states incorrect?
Thanks,
Alan
--
OpenPGP Key ID : 040D0A3B4ED2E5C7
Monthly Athmospheric CO₂ (2016-01, Mauna Loa Obs.): 402.52
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 472 bytes
Desc: not available
Url : https://lists.ourproject.org/pipermail/implementations-list/attachments/20160211/edc8b911/attachment.pgp
More information about the implementations-list
mailing list