[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

keyboard.c: Overriding binding to only `(kdb "S")`

From: Artur Zochniak
Subject: keyboard.c: Overriding binding to only `(kdb "S")`
Date: Thu, 29 Sep 2016 18:43:32 +0200

Hello Emacs Community!

So I am trying to fight with RSI and 
I would like to have sticky modifier key for Emacs25 
with a debouncer, this means: 

  (global-set-key (kdb "S") 'debounced-shift)

  ; if user presses shift - keep it pressed till either another 
  ;key is pressed (make it upper char) or elapsed 30 sec
  ; pseudo-code ofc
  (defn debounced-shift []
    (set-modifier-key 'shift)
    (setq last-pressed-key 'shift)
    (run-with-timer '30 sec' (lambda () (unset-modifier-key 'shift)))

so far I have digged to this moment 

Can somebody instruct me what has to be done so I am able to get for example (global-set-key (kdb "S") 'newline-and-indent)?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]