[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master de419bba04 4/4: Fix the Scroll key binding on Windows
From: |
Lars Ingebrigtsen |
Subject: |
master de419bba04 4/4: Fix the Scroll key binding on Windows |
Date: |
Sun, 6 Feb 2022 22:58:56 -0500 (EST) |
branch: master
commit de419bba04601b163def31308d63c51ed90b1458
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Fix the Scroll key binding on Windows
* lisp/bindings.el (global-map): Fix the binding on Windows
(bug#38007).
* lisp/scroll-lock.el (scroll-lock-mode): The event is `scroll' on
Windows, not `Scroll_Lock'.
---
lisp/bindings.el | 4 +++-
lisp/scroll-lock.el | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/lisp/bindings.el b/lisp/bindings.el
index 26b17035ef..8ae8c3d60e 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -1160,7 +1160,9 @@ if `inhibit-field-text-motion' is non-nil."
;(define-key global-map [delete] 'backward-delete-char)
;; natural bindings for terminal keycaps --- defined in X keysym order
-(define-key global-map [Scroll_Lock] 'scroll-lock-mode)
+(define-key global-map
+ (if (eq system-type 'windows-nt) [scroll] [Scroll_Lock])
+ #'scroll-lock-mode)
(define-key global-map [C-S-backspace] 'kill-whole-line)
(define-key global-map [home] 'move-beginning-of-line)
(define-key global-map [C-home] 'beginning-of-buffer)
diff --git a/lisp/scroll-lock.el b/lisp/scroll-lock.el
index d41e335233..3f5f777f53 100644
--- a/lisp/scroll-lock.el
+++ b/lisp/scroll-lock.el
@@ -55,7 +55,7 @@ will scroll the buffer by the respective amount of lines
instead
and point will be kept vertically fixed relative to window
boundaries during scrolling.
-Note that the default key binding to Scroll_Lock will not work on
+Note that the default key binding to `scroll' will not work on
MS-Windows systems if `w32-scroll-lock-modifier' is non-nil."
:lighter " ScrLck"
:keymap scroll-lock-mode-map