From c0195a9f4c9e3d8790ff7c597a8054556f89689b Mon Sep 17 00:00:00 2001 From: Daniel Alejandro Tapia Date: Mon, 30 Dec 2024 17:13:23 -0500 Subject: [PATCH] make `F13` to `F24` keys available in SDL2 frontend make `F13` to `F24` keys available in SDL2 frontend. i don't see any reason not to add these keys since SLD2 supports them just fine. some people (like me) put these keys on their mechanical keyboards, and they're great because most OSes don't map them to anything, so they're free for users --- frontends/sdl2/keyboard.lisp | 14 +++++++++++++- src/key.lisp | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/frontends/sdl2/keyboard.lisp b/frontends/sdl2/keyboard.lisp index 90b705133..d95e337e5 100644 --- a/frontends/sdl2/keyboard.lisp +++ b/frontends/sdl2/keyboard.lisp @@ -40,7 +40,19 @@ (,sdl2-ffi:+sdlk-f9+ "F9" nil) (,sdl2-ffi:+sdlk-f10+ "F10" nil) (,sdl2-ffi:+sdlk-f11+ "F11" nil) - (,sdl2-ffi:+sdlk-f12+ "F12" nil))) + (,sdl2-ffi:+sdlk-f12+ "F12" nil) + (,sdl2-ffi:+sdlk-f13+ "F13" nil) + (,sdl2-ffi:+sdlk-f14+ "F14" nil) + (,sdl2-ffi:+sdlk-f15+ "F15" nil) + (,sdl2-ffi:+sdlk-f16+ "F16" nil) + (,sdl2-ffi:+sdlk-f17+ "F17" nil) + (,sdl2-ffi:+sdlk-f18+ "F18" nil) + (,sdl2-ffi:+sdlk-f19+ "F19" nil) + (,sdl2-ffi:+sdlk-f20+ "F20" nil) + (,sdl2-ffi:+sdlk-f21+ "F21" nil) + (,sdl2-ffi:+sdlk-f22+ "F22" nil) + (,sdl2-ffi:+sdlk-f23+ "F23" nil) + (,sdl2-ffi:+sdlk-f24+ "F24" nil))) (defun convert-to-sym (code) (let ((keyinfo (assoc code *code-name-table*))) diff --git a/src/key.lisp b/src/key.lisp index 1dd4fe0f6..b32dfcf0b 100644 --- a/src/key.lisp +++ b/src/key.lisp @@ -1,7 +1,7 @@ (in-package :lem-core) (defvar *named-key-syms* - '("Backspace" "Insert" "Delete" "Down" "End" "Escape" "F0" "F1" "F10" "F11" "F12" "F2" "F3" "F4" "F5" "F6" "F7" "F8" "F9" + '("Backspace" "Insert" "Delete" "Down" "End" "Escape" "F0" "F1" "F10" "F11" "F12" "F13" "F14" "F15" "F16" "F17" "F18" "F19" "F2" "F20" "F21" "F22" "F23" "F24" "F3" "F4" "F5" "F6" "F7" "F8" "F9" "Home" "Left" "NopKey" "PageDown" "PageUp" "Return" "Right" "Space" "Tab" "Up")) (defun named-key-sym-p (key-sym)