Does anyone know how to redefine the bindkeys in x...
# xschem
p
Does anyone know how to redefine the bindkeys in xschem?
s
see the xschem provided sample xschemrc file:
Copy code
###########################################################################
#### KEYBINDINGS
###########################################################################
#### General format for specifying a replacement for a keybind
#### Replace Ctrl-q with Escape (so you wont kill the program)
# set replace_key(Control-q) Escape

#### swap w and W keybinds; Always specify Shift for capital letters
# set replace_key(Shift-W) Key-w
# set replace_key(Key-w) Shift-W
some examples:
#### translate Control-q to Escape. Escape does just a redraw schematic.
# set replace_key(Control-q) Escape
#### swap w and W keybinds; Always specify Shift for capital letters
# set replace_key(Shift-W) Key-w
# set replace_key(Key-w) Shift-W
#### redefine undo and redo (and move zoom out crom ctrl-z to u)
# set replace_key(u) Control-z              ;# zoom out
# set replace_key(Control-z) u              ;# undo
# set replace_key(Control-Shift-Z) Shift-U  ;# redo
# set replace_key(Control-y) Shift-U  ;# redo
#### Use shift-E to descend to symbol and 'i' to place a component
#### for Cadence nostalgic ...
# set replace_key(Shift-E) i
# set replace_key(i) Shift-I
p
Thanks @Stefan Schippers, this is exactly what I was looking for ❤️
s
Be careful, if you create a bindkey xxxx and map it to yyyy (xxxx,yyyy= any key combination optionally with shift, ctrl, etc) and if xxxx is an existing default keybinding in xschem that keybinding will be aliased (its original function will not be available, unless some other zzzz keybinding is translated to xxxx). Example: This definition:
set replace_key(u) Control-z              ;# zoom out
will transform
u
keypresses to
Control-z
(Zoom out by default). The original
u
function (Undo) will not be available, unless some other keybinding is translated to `u`:
set replace_key(Control-z) u              ;# undo