File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -151,6 +151,35 @@ And now we can define the prefix key for our keymap and all its sub-keys command
151151
152152As a result, we defined ` C-z c ` for ` 'frame-mulitplexer-create-with-new-buffer-list ` .
153153
154+ ### Change the Alt (Meta) key
155+
156+ The editor variable ` meta-prefix-keys ` allows to treat keys as the Meta (Alt) prefix without timeout.
157+
158+ - when enabled, pressing a prefix key followed by another key produces Meta+key immediately
159+ - pressing the same prefix key twice produces the prefix key itself
160+ - implemented in core layer, works across all frontends
161+
162+ Example:
163+
164+ ``` lisp
165+ ;; Use Escape as Meta prefix (simplest)
166+ (setf (lem:variable-value 'lem:meta-prefix-keys :global) t)
167+
168+ ;; Use a specific key as Meta prefix
169+ (setf (lem:variable-value 'lem:meta-prefix-keys :global)
170+ (lem:make-key :ctrl t :sym ";"))
171+
172+ ;; Use multiple keys as Meta prefix
173+ (setf (lem:variable-value 'lem:meta-prefix-keys :global)
174+ (list (lem:make-key :sym "Escape")
175+ (lem:make-key :ctrl t :sym ";")))
176+ ```
177+
178+ | Input | Output |
179+ | -------| --------|
180+ | Escape x | M-x |
181+ | Escape Escape | Escape |
182+ | Escape C-c | M-C-c |
154183
155184## Undefining keys
156185
You can’t perform that action at this time.
0 commit comments