Emacs keybindings not work & reference for keyboard commands

System info: TeXmacs 2.1 + Mac OS 12.0.1 in MacBook Air M1 chip.

If the Look and feel option is set to Emacs, then Ctrl+A and Ctrl+E works as in emacs. However, other keybindings such as Alt+f, Alt+b, Alt+d does not work as it should. I have disabled the system keybindings such as alt+f in Mac OS (using the Unicode Hex input).

In fact, I’d like to use the Mac OS keybindings for most operations. So I want to define my own keyboard shortcuts, e.g. Alt+f to move forward a word. But what is the command for “forward-a-word” in the Shorcuts editor? Is there a reference for all possible commands?

In fact, the shortcuts in the Shortcuts editor can’t be removed or modified. I can edit the shortcuts.scm file in ~/.TeXmacs though. But I don’t know the command name for the actions, such as move forward or delete a word.

1 Like

I haven’t used the shortcuts editor much yet, I find it easier to put shortcuts in my-init-texmacs.scm. See also the snippets wiki post on this forum.

Often you need to search the source code for the commands you need. I use a keyboard shortcut for deleting whole words. Perhaps it can serve as a starting point for your search:

(delayed (lazy-keyboard-force)
(kbd-map
(:mode in-text?)
; Delete by words in text
("C-S-backspace" (begin (kbd-select traverse-left) (kbd-delete))))
)
1 Like