Fix: set_replace_key_binding was not working due to missing global array declaration.

This commit is contained in:
Stefan Frederik 2021-01-17 18:01:19 +01:00
parent 86bafe1f9b
commit 34a664e62f
2 changed files with 7 additions and 4 deletions

View File

@ -259,8 +259,10 @@ proc key_binding { s d } {
bind .drw "<${s}>" "xschem callback %T %x %y 0 $key 0 $state"
} else {
if {![string compare $d {} ] } {
puts "bind .drw <${s}> {}"
bind .drw "<${s}>" {}
} else {
puts "bind .drw <${s}> xschem callback %T %x %y $keysym 0 0 $state"
bind .drw "<${s}>" "xschem callback %T %x %y $keysym 0 0 $state"
}
}
@ -3393,6 +3395,7 @@ proc create_layers_menu {} {
}
proc set_replace_key_binding {} {
global replace_key
if {[array exists replace_key]} {
foreach i [array names replace_key] {
key_binding "$i" "$replace_key($i)"

View File

@ -210,12 +210,12 @@
#### KEYBINDINGS
###########################################################################
#### General format for specifying a replacement for a keybind
#### Replace Ctrl-d with Escape (so you wont kill the program)
# set replace_key(Control-d) Escape
#### 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) w
# set replace_key(w) Shift-W
# set replace_key(Shift-W) Key-w
# set replace_key(Key-w) Shift-W
###########################################################################
#### TERMINAL