diff options
| author | Cecilio Pardo | 2024-12-02 17:30:42 +0100 |
|---|---|---|
| committer | Stefan Monnier | 2025-06-30 11:34:54 -0400 |
| commit | ba02efb85e403a55d321e3d213f1449246ad9484 (patch) | |
| tree | 59689a9187907215c6f0ac3ecc1057f59f11f328 /src/keyboard.c | |
| parent | 67aed063f6460e8add0fcfdebf562a3062cc26a2 (diff) | |
| download | emacs-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.c | 9 |
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 | ||
| 13159 | If t, send events for all keys. | 13159 | If t, send events for all keys. |
| 13160 | 13160 | ||
| 13161 | If a number, send events for the corresponding keysym. When calling | 13161 | If 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 | 13162 | platform dependente. See `llk-keysyms'. |
| 13163 | the numeric values for keysyms. Because this number are platform | ||
| 13164 | dependent, only the variables should be used to refer to a key. For | ||
| 13165 | example, the 'xk-backspace' variable refer to the backspace key, with | ||
| 13166 | the numeric value 0xff08 on X, and the 0x08 on MS-Windows. You can see | ||
| 13167 | all defined variables on the variable `llk-keysyms'. | ||
| 13168 | 13163 | ||
| 13169 | If a symbol, a predefined set of keys is selected. The only currently | 13164 | If a symbol, a predefined set of keys is selected. The only currently |
| 13170 | valid symbol is 'modifiers. | 13165 | valid symbol is 'modifiers. |