From 1be3fdfa0acdedf15c476b9df8eaaf4f88ed4265 Mon Sep 17 00:00:00 2001 From: deb0ch Date: Sun, 18 Dec 2016 01:38:24 +0100 Subject: [PATCH] =?UTF-8?q?add=20`=C2=B2`=20bindings=20to=20handle=20azert?= =?UTF-8?q?y=20keyboard=20layouts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.org | 9 ++++++--- winum.el | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.org b/README.org index 70b3a6a..4de5184 100644 --- a/README.org +++ b/README.org @@ -112,6 +112,7 @@ directly override =winum-keymap=: (setcdr (assoc 'winum-mode minor-mode-map-alist) (let ((map (make-sparse-keymap))) (define-key map (kbd "C-`") 'winum-select-window-by-number) + (define-key map (kbd "C-²") 'winum-select-window-by-number) (define-key map (kbd "M-0") 'winum-select-window-0-or-10) (define-key map (kbd "M-1") 'winum-select-window-1) (define-key map (kbd "M-2") 'winum-select-window-2) @@ -129,9 +130,10 @@ directly override =winum-keymap=: This is a little bit hacky but is less code than using =define-key=, and will also shadow the old bindings. -*NB:* the ~`~ key is convenient on qwerty keyboards, however if you are using a - different keyboard you should replace it with the key beside ~1~. - For instance, ~²~ on an azerty keyboard. +*NB:* Both ~`~ and ~²~ are mapped to =winum-select-window-by-number= to handle + both =qwerty= and =azerty= keyboard layouts. + If you are using a different kind of layout, the recommended place to map + it is the key beside ~1~. ** Customize options Several options are available through Emacs' Customize interface under @@ -225,6 +227,7 @@ available winum options. (setcdr (assoc 'winum-mode minor-mode-map-alist) (let ((map (make-sparse-keymap))) (define-key map (kbd "C-`") 'winum-select-window-by-number) + (define-key map (kbd "C-²") 'winum-select-window-by-number) (define-key map (kbd "M-0") 'winum-select-window-0-or-10) (define-key map (kbd "M-1") 'winum-select-window-1) (define-key map (kbd "M-2") 'winum-select-window-2) diff --git a/winum.el b/winum.el index 8f2b0d6..28b4acc 100644 --- a/winum.el +++ b/winum.el @@ -125,6 +125,7 @@ numbers in the mode-line.") (let ((map (make-sparse-keymap))) (let ((prefix-map (make-sparse-keymap))) (define-key prefix-map (kbd "`") 'winum-select-window-by-number) + (define-key prefix-map (kbd "²") 'winum-select-window-by-number) (define-key prefix-map (kbd "0") 'winum-select-window-0-or-10) (define-key prefix-map (kbd "1") 'winum-select-window-1) (define-key prefix-map (kbd "2") 'winum-select-window-2)