From: Lars Ingebrigtsen <larsi@gnus.org> Date: Mon, 7 Feb 2022 03:57:27 +0000 (+0100) Subject: Fix the Scroll key binding on Windows X-Git-Tag: emacs-29.0.90~2463 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=de419bba04601b163def31308d63c51ed90b1458;p=emacs.git 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'. --- diff --git a/lisp/bindings.el b/lisp/bindings.el index 26b17035ef9..8ae8c3d60ef 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 d41e3352332..3f5f777f53f 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