From fcbaa23ccfe82f2fc8ca1e0aef6ff4d7b59f63b2 Mon Sep 17 00:00:00 2001 From: DocJr90 <47301674+DocJr90@users.noreply.github.com> Date: Mon, 11 Nov 2024 10:28:59 -0500 Subject: [PATCH] Add "scroll_lock" key (#800) Added "scroll_lock" equates to KeyEvent.KEYCODE_SCROLL_LOCK --- doc/Possible-key-values.md | 3 ++- srcs/juloo.keyboard2/KeyValue.java | 1 + srcs/juloo.keyboard2/prefs/ExtraKeysPreference.java | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/Possible-key-values.md b/doc/Possible-key-values.md index e6a1ddd..76cdbe0 100644 --- a/doc/Possible-key-values.md +++ b/doc/Possible-key-values.md @@ -46,7 +46,8 @@ These keys are sent to apps, which are free to ignore them. The keyboard does no `page_up`, `page_down`, `home`, `end`, `backspace`, `delete`, -`insert`, `f1`-`f12`, +`insert`, `scroll_lock`, +`f1`-`f12`, `tab`, `copy`, `paste`, `cut`, `selectAll`, `pasteAsPlainText`, diff --git a/srcs/juloo.keyboard2/KeyValue.java b/srcs/juloo.keyboard2/KeyValue.java index 41dfd56..4e9e507 100644 --- a/srcs/juloo.keyboard2/KeyValue.java +++ b/srcs/juloo.keyboard2/KeyValue.java @@ -605,6 +605,7 @@ public final class KeyValue implements Comparable case "f12": return keyeventKey("F12", KeyEvent.KEYCODE_F12, FLAG_SMALLER_FONT); case "tab": return keyeventKey(0xE00F, KeyEvent.KEYCODE_TAB, FLAG_SMALLER_FONT); case "menu": return keyeventKey("Menu", KeyEvent.KEYCODE_MENU, FLAG_SMALLER_FONT); + case "scroll_lock": return keyeventKey("Scrl", KeyEvent.KEYCODE_SCROLL_LOCK, FLAG_SMALLER_FONT); /* Spaces */ case "\\t": return charKey("\\t", '\t', 0); // Send the tab character diff --git a/srcs/juloo.keyboard2/prefs/ExtraKeysPreference.java b/srcs/juloo.keyboard2/prefs/ExtraKeysPreference.java index 04ac8b2..f7ab445 100644 --- a/srcs/juloo.keyboard2/prefs/ExtraKeysPreference.java +++ b/srcs/juloo.keyboard2/prefs/ExtraKeysPreference.java @@ -72,6 +72,7 @@ public class ExtraKeysPreference extends PreferenceCategory "f11_placeholder", "f12_placeholder", "menu", + "scroll_lock", "combining_dot_above", "combining_double_aigu", "combining_slash",