]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix the Scroll key binding on Windows
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 7 Feb 2022 03:57:27 +0000 (04:57 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 7 Feb 2022 03:58:49 +0000 (04:58 +0100)
* 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
lisp/scroll-lock.el

index 26b17035ef9c52fdab5fcd74632296e81c22ca98..8ae8c3d60ef418077e423dae56c039bb6409c686 100644 (file)
@@ -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)
index d41e33523324018d314cefa4a4122cef1fd2c888..3f5f777f53f3e12495041e4131c4a5b1c9c04145 100644 (file)
@@ -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