Skip to content

Commit

Permalink
Add commands to bind/unbind keys in the root keymap
Browse files Browse the repository at this point in the history
  • Loading branch information
mwitmer committed Feb 3, 2014
1 parent f31cbe0 commit 94b7a37
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions module/guile-wm/module/root-keymap.scm
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@

(define-public root-key (make-procedure-with-setter root-key-ref root-key-set!))

(define-command (bind-root-key! (key #:symbol) (str #:string))
(bind-key-command! root-keymap key str))

(define-command (unbind-root-key! (key #:symbol))
(unbind-key! root-keymap key))

(define (run-keymap get)
(define (default d) (message (format #f "Unknown key: ~a" d)))
(define keymap (keymap-with-default root-keymap default))
Expand Down

0 comments on commit 94b7a37

Please sign in to comment.