aboutsummaryrefslogtreecommitdiffstats
path: root/src/keyboard.c
diff options
context:
space:
mode:
authorCecilio Pardo2024-12-02 17:30:42 +0100
committerStefan Monnier2025-06-30 11:34:54 -0400
commitba02efb85e403a55d321e3d213f1449246ad9484 (patch)
tree59689a9187907215c6f0ac3ecc1057f59f11f328 /src/keyboard.c
parent67aed063f6460e8add0fcfdebf562a3062cc26a2 (diff)
downloademacs-scratch/low-level-key.tar.gz
emacs-scratch/low-level-key.zip
Go through normal keymapsscratch/low-level-key
In this new version I changed the way events are handled. Now llk-handle generates input events to be used with normal keymaps, instead of running a command. The function llk-bind activates event generation for a key and a combination of events press, release, double, triple. I also made changes following your notes, such as: - Clarification on the event's time, documentation of keysyms variables moved, don't limit to GUI systems. - cl-defstruct for the event payload. - Format and naming conventions. - Default timeout to mouse double click timeout. You suggested to auto generate the keysym table, but we would still need a table to relate the Windows keys to the X equivalent. * doc/lispref/commands.texi (Misc Events): Adjust to new semantics. * src/keyboard.c (syms_of_keyboard): Adust docstring. FIXME: Old commit msg. * lisp/low-level-key.el (New file). (low-level-key): Struct with event data. (llk-bindings): User bindings for low level key events. (llk-tap-timeout): User option. (llk-keysyms): List of available keysyms. (llk--define-xk): Macro for defining keysyms. (llk--define-keysyms): Build llk-keysyms. (llk-bind): Function to create a binding. (llk--event-history-for-tap): Event history for tap detection. (llk--detect-n-tap): Function to detect taps. (describe-low-level-key): Command to get information about a key. (llk--describe): Show help buffer with information about an event. (llk-handle): Handler for key events. (llk--generate-event): Generate input event for key. (llk--generate-events): Generate input events for key.
Diffstat (limited to 'src/keyboard.c')
-rw-r--r--src/keyboard.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 4bf02a06696..f5e9dc40a33 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -13158,13 +13158,8 @@ The value configures the set of keys that are handled:
13158 13158
13159If t, send events for all keys. 13159If t, send events for all keys.
13160 13160
13161If a number, send events for the corresponding keysym. When calling 13161If a number, send events for the corresponding keysym. This numbers are
13162`llk-init', a set of variables with the xk- prefix is initialized with 13162platform dependente. See `llk-keysyms'.
13163the numeric values for keysyms. Because this number are platform
13164dependent, only the variables should be used to refer to a key. For
13165example, the 'xk-backspace' variable refer to the backspace key, with
13166the numeric value 0xff08 on X, and the 0x08 on MS-Windows. You can see
13167all defined variables on the variable `llk-keysyms'.
13168 13163
13169If a symbol, a predefined set of keys is selected. The only currently 13164If a symbol, a predefined set of keys is selected. The only currently
13170valid symbol is 'modifiers. 13165valid symbol is 'modifiers.