
#This file defines the keybindings for Radium.
#The syntax is actually a compact version of the Interpreted/compiled language "Python".
#Radium parses this file, and sometime use parts of it to make a new generated file named
#"keybindings_generated.py", which again is loaded into Radium (self-modifying code).



####################################################
#  Computer Keyboard Note Playing/Editing
####################################################

?define POLYSWITCH SHIFT_L
?define DOWNPLAY                  ra.keyDownPlay
?define DOWNPOLYPLAY POLYSWITCH : ra.polyKeyDownPlay
?define UPPLAY UP POLYSWITCH    : ra.keyUpPlay
?define UPPOLYPLAY UP           : ra.keyUpPlay

?define(a) KEYHANDLE DOWNPLAY a ?n DOWNPOLYPLAY a ?n UPPLAY a ?n UPPOLYPLAY a

Z   :	KEYHANDLE 0
S   :	KEYHANDLE 1
X   :	KEYHANDLE 2
D   :	KEYHANDLE 3
C   :	KEYHANDLE 4
V   :	KEYHANDLE 5
G   :	KEYHANDLE 6
B   :	KEYHANDLE 7
H   :	KEYHANDLE 8
N   :	KEYHANDLE 9
J   :   KEYHANDLE 10
M   :   KEYHANDLE 11
MR1 :   KEYHANDLE 12
L   :   KEYHANDLE 13
MR2 :   KEYHANDLE 14
LR1 :   KEYHANDLE 15
MR3 :   KEYHANDLE 16
LR3 :   KEYHANDLE 18

Q   :   KEYHANDLE 12
2   :   KEYHANDLE 13
W   :   KEYHANDLE 14
3   :   KEYHANDLE 15
E   :   KEYHANDLE 16
R   :   KEYHANDLE 17
5   :   KEYHANDLE 18
T   :   KEYHANDLE 19
6   :   KEYHANDLE 20
Y   :   KEYHANDLE 21
7   :   KEYHANDLE 22
U   :   KEYHANDLE 23
I   :   KEYHANDLE 24
9   :   KEYHANDLE 25
O   :   KEYHANDLE 26
0   :   KEYHANDLE 27
P   :   KEYHANDLE 28
PR1 :   KEYHANDLE 29
0R2 :   KEYHANDLE 30
PR2 :   KEYHANDLE 31
0R3 :   KEYHANDLE 32


F1: ra.setKeyAdd  0
F2: ra.setKeyAdd 24
F3: ra.setKeyAdd 48
F4: ra.setKeyAdd 72
F5: ra.setKeyAdd 96

TAB         : ra.incKeyAdd 24
    SHIFT_L : ra.decKeyAdd 24

ESC: ra.switchEditOnOff

1L1:
    CTRL_L  : ra.switchScrollPlayOnOff
    ALT_L   : ra.switchSoundScrollOnOff



####################################################
#  Navigating
####################################################

DOWNARROW   : ra.cursorDown 1
    SHIFT_R : ra.cursorDown 10
    ALT_R   : ra.cursorNextNote

UPARROW     : ra.cursorUp 1
    SHIFT_R : ra.cursorUp 10
    ALT_R   : ra.cursorPrevNote
    
RIGHTARROW  : ra.cursorRight
    ALT_R   : ra.cursorNextTrack

LEFTARROW   : ra.cursorLeft
    ALT_R   : ra.cursorPrevTrack


F6  : ra.cursorPercentLine   0
F7  : ra.cursorPercentLine  25
F8  : ra.cursorPercentLine  50
F9  : ra.cursorPercentLine  75
F10 : ra.cursorPercentLine 100

F           : ra.selectNextBlock
    SHIFT_R : ra.selectNextPlaylistBlock
A           : ra.selectPrevBlock
    SHIFT_R : ra.selectPrevPlaylistBlock



#################
#Some defines for the keypad to make the file more compact and faster to edit.
*
def ra_selectBlockAdd(ra,a,b):
 #    ra.selectBlock(a+b)
    c=a+b
    print "jadda: %d" % c
    return
*
?define KP_CTRL_L CTRL_L : eventreceiverparser_generated.selectBlockAdd ra
?define KP_CAPS CAPS : eventreceiverparser_generated.selectBlockAdd ra
?define KP_CTRL_L_CAPS CTRL_L CAPS : eventreceiverparser_generated.selectBlockAdd ra
?define(a) KEYPAD_NAV ra.selectBlock a ?n KP_CTRL_L a 10 ?n KP_CAPS a 20 ?n KP_CTRL_L_CAPS a 30
#################


KP_0: KEYPAD_NAV 0
KP_1: KEYPAD_NAV 1
KP_2: KEYPAD_NAV 2
KP_3: KEYPAD_NAV 3
KP_4: KEYPAD_NAV 4
KP_5: KEYPAD_NAV 5
KP_6: KEYPAD_NAV 6
KP_7: KEYPAD_NAV 7
KP_8: KEYPAD_NAV 8
KP_9: KEYPAD_NAV 9




