OXYGENHUB
◆ main openmsx / share / scripts / keybindings.tcl
1.4 KiB · Tcl · last changed chore(): initial commit 1 month ago source blame history raw
1
# Since we are now supporting specific platforms we need a
2
# solution to support key bindings for multiple devices.
3
4
# cycle_machine
5
bind_default CTRL+PAGEUP cycle_machine
6
bind_default CTRL+PAGEDOWN cycle_back_machine
7
8
# reverse
9
#  note: you can't use bindings with modifiers like SHIFT, because they
10
#        will already stop the replay, as they are MSX keys as well
11
bind_default PAGEUP   -msx -repeat "go_back_one_step"
12
bind_default PAGEDOWN -msx -repeat "go_forward_one_step"
13
14
# savestate
15
if {$tcl_platform(os) eq "Darwin"} {
16
	bind_default META+S savestate
17
	bind_default META+R loadstate
18
} else {
19
	bind_default ALT+F8 savestate
20
	bind_default ALT+F7 loadstate
21
}
22
23
# vdrive
24
bind_default       ALT+F9  "vdrive diska"
25
bind_default SHIFT+ALT+F9  "vdrive diska -1"
26
bind_default       ALT+F10 "vdrive diskb"
27
bind_default SHIFT+ALT+F10 "vdrive diskb -1"
28
29
# copy/paste (use middle-click for all platforms and also something similar to
30
# CTRL-C/CTRL-V, but not exactly that, as these combinations are also used on
31
# MSX. By adding META, the combination will be so rarely used that we can
32
# assume it's OK).
33
bind_default -msx "mouse button2 down" type_clipboard
34
if {$tcl_platform(os) eq "Darwin"} { ;# Mac
35
	bind_default -msx "keyb META+C" copy_screen_to_clipboard
36
	bind_default -msx "keyb META+V" type_clipboard
37
} else { ;# any other
38
	bind_default -msx "keyb META+CTRL+C" copy_screen_to_clipboard
39
	bind_default -msx "keyb META+CTRL+V" type_clipboard
40
}