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

Attachment: signature.asc
Description: PGP signature

_______________________________________________
implementations-list mailing list
implementations-list@lists.ourproject.org
https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list

Reply via email to