Last active
August 3, 2020 17:35
-
-
Save Metaxal/b233efb81649cd7e7fe0786cc0cb6394 to your computer and use it in GitHub Desktop.
A quickscript to show the active keybindings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket/gui | |
;;; License: MIT/Apache2 | |
(require quickscript | |
search-list-box) | |
(script-help-string "Show active keybindings") | |
(define-script keybindings | |
#:label "keybindings" | |
(λ (selection #:editor ed) | |
(define kmap (send ed get-keymap)) | |
(define tb (sort (hash->list (send kmap get-map-function-table)) | |
string<? #:key cdr)) | |
(define fr | |
(new search-list-box-frame% | |
[label "Show active keybindings"] | |
[contents tb] | |
[key (λ (cont) (format "~a (~a)" (cdr cont) (car cont)))])) | |
#f)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.