From 55e5803b8ca1f50b965c4c8a89b7ff3a70e7a003 Mon Sep 17 00:00:00 2001 From: cxxxr Date: Sun, 1 Oct 2023 16:48:38 +0900 Subject: [PATCH] Fix for keystrokes when shift is pressed in linux --- frontends/sdl2/keyboard.lisp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/frontends/sdl2/keyboard.lisp b/frontends/sdl2/keyboard.lisp index 2e68ab578..a9f48ad3e 100644 --- a/frontends/sdl2/keyboard.lisp +++ b/frontends/sdl2/keyboard.lisp @@ -82,13 +82,11 @@ code modifier) -(defun make-key-event (code modifier) - (%make-key-event :code code :modifier modifier)) - (defun keysym-to-key-event (keysym) (let ((code (sdl2:sym-value keysym)) (modifier (get-modifier keysym))) - (make-key-event code modifier))) + (%make-key-event :code code + :modifier modifier))) (defparameter *modifier-code-table* `((:shift ,sdl2-ffi:+kmod-lshift+ ,sdl2-ffi:+kmod-rshift+) @@ -128,7 +126,8 @@ ;; linux (defun modifier-is-accept-text-input-p (modifier) - (not (modifier-ctrl modifier))) + (and (not (modifier-ctrl modifier)) + (modifier-meta modifier))) (defmethod handle-text-input ((platform lem-sdl2/platform:linux) text) (when (modifier-is-accept-text-input-p *modifier*)