File: keybindings.tcl

package info (click to toggle)
openmsx 21.0%2Bdfsg-3
  • links: PTS
  • area: main
  • in suites: sid
  • size: 28,132 kB
  • sloc: cpp: 244,928; xml: 54,344; tcl: 15,603; python: 5,335; perl: 281; sh: 78; makefile: 57
file content (40 lines) | stat: -rw-r--r-- 1,439 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Since we are now supporting specific platforms we need a
# solution to support key bindings for multiple devices.

# cycle_machine
bind_default CTRL+PAGEUP cycle_machine
bind_default CTRL+PAGEDOWN cycle_back_machine

# reverse
#  note: you can't use bindings with modifiers like SHIFT, because they
#        will already stop the replay, as they are MSX keys as well
bind_default PAGEUP   -msx -repeat "go_back_one_step"
bind_default PAGEDOWN -msx -repeat "go_forward_one_step"

# savestate
if {$tcl_platform(os) eq "Darwin"} {
	bind_default META+S savestate
	bind_default META+R loadstate
} else {
	bind_default ALT+F8 savestate
	bind_default ALT+F7 loadstate
}

# vdrive
bind_default       ALT+F9  "vdrive diska"
bind_default SHIFT+ALT+F9  "vdrive diska -1"
bind_default       ALT+F10 "vdrive diskb"
bind_default SHIFT+ALT+F10 "vdrive diskb -1"

# copy/paste (use middle-click for all platforms and also something similar to
# CTRL-C/CTRL-V, but not exactly that, as these combinations are also used on
# MSX. By adding META, the combination will be so rarely used that we can
# assume it's OK).
bind_default "mouse button2 down" type_clipboard
if {$tcl_platform(os) eq "Darwin"} { ;# Mac
	bind_default -msx "keyb META+C" copy_screen_to_clipboard
	bind_default -msx "keyb META+V" type_clipboard
} else { ;# any other
	bind_default -msx "keyb META+CTRL+C" copy_screen_to_clipboard
	bind_default -msx "keyb META+CTRL+V" type_clipboard
}