How to disable a builtin keyboard shortcut without modifying system files

The shortcut for =@ in math mode gives a special symbol. But I write =@@ very often. A workaround is to type ESC after =. The shortcut can also be disabled in the system file, but it may not be safe and will fall back upon updates. How do I disable a shortcut in the init file?

I do not think you can. You can however define a new shortcut for =@@ to do what you want. Alternatively you can copy the file where the shortcut is defined an put it in your ~/.TeXmacs/progs directory in exactly the same path. Then modify it as you like. TeXmacs should pick up your local version when looking for it.

1 Like

This should be the best option. Thanks!

It has the disadvantage that if the file gets modified in the TeXmacs distribution, you do not pick up the new file.
I agree that it would be nice to remove a shortcut.

Apparently one can do

 (:mode in-math?)
 "= @")

Neat solution. (I wondered if Joris had thought about it). How did you discovered that?

I was checking the code to see how kbd-map works and then noticed the definition of unmap. Apparently it’s used in the dialogue to graphically define user shortcuts, when one is removed there.


Which file contains the definition of kbd-map?

It’s in TeXmacs/progs/kernel/gui/kdb-define.scm.

Somehow I can’t unbind C-c by



(:mode in-text?)

This shortcut inserts a multiple choice in projector style. I don’t think it’s specific to this style, because I can’t unbind C-1 neither, which is a generic shorcut.