# File: pref-sdl.prf

#
# This file is included by "pref.prf" when "main-win.c" is used.
#
# This file implements macros for extended keyboard commands (characters not
# within the 128 character ASCII set).
# Basically, if you have to hold down control or alt or it's an arrow key,
# it will be handled here. This means that we can let SDL worry about figuring
# out what key is which; all it needs to do is give us the name and we'll map
# it here.   -Neil Stevens-
#
# Note the use of "\\." (for "run") and "\\+" (for "alter"), to make sure
# that the macros will work regardless of the "keymap" being used.
#
# See "main-sdl.c" for more info.
#

#
# Macro Trigger configuration
#
# T:<trigger template>:<modifiers>:<modifier name1>:<modifier name2>:....
# '&' in <trigger template> specifies location of modifier character.
# '#' in <trigger template> specifies location of key code.
#
# If <trigger template> is null string, all trigger difinition will be cleared.

T:&_#:NSOM:control-:shift-:alt-:mod2-

############

# T:<trigger name>:<keycode>:<keycode with shiftkey>
# '\' in <trigger name> is escape character.

T:Clear:clear
T:Pause:pause
T:Scroll_Lock:scroll_lock
T:Sys_Req:sys_req
T:Escape:escape
T:Delete:delete
T:Multi_Key:multi_key
T:Codeinput:codeinput
T:SingleCandidate:singlecandidate
T:MultipleCandidate:multiplecandidate
T:PreviousCandidate:previouscandidate
T:Kanji:kanji
T:Muhenkan:muhenkan
T:Henkan:henkan
T:Henkan_Mode:henkan_mode
T:Romaji:romaji
T:Hiragana:hiragana
T:Katakana:katakana
T:Hiragana_Katakana:hiragana_katakana
T:Zenkaku:zenkaku
T:Hankaku:hankaku
T:Zenkaku_Hankaku:zenkaku_hankaku
T:Touroku:touroku
T:Massyo:massyo
T:Kana_Lock:kana_lock
T:Kana_Shift:kana_shift
T:Eisu_Shift:eisu_shift
T:Eisu_Toggle:eisu_toggle
T:Kanji_Bangou:kanji_bangou
T:Zen_Koho:zen_koho
T:Mae_Koho:mae_koho
T:Home:home
T:Left:left
T:Up:up
T:Right:right
T:Down:down
T:Page_Up:page_up
T:Page_Down:page_down
T:End:end
T:Begin:begin
T:Select:select
T:Print:print
T:Execute:execute
T:Insert:insert
T:Undo:undo
T:Redo:redo
T:Menu:menu
T:Find:find
T:Cancel:cancel
T:Help:help
T:Break:break
T:Mode_Switch:mode_switch
T:KP_F1:kp_f1
T:KP_F2:kp_f2
T:KP_F3:kp_f3
T:KP_F4:kp_f4
T:KP_Home:kp_home
T:KP_Left:kp_left
T:KP_Up:kp_up
T:KP_Right:kp_right
T:KP_Down:kp_down
T:KP_Page_Up:kp_page_up
T:KP_Page_Down:kp_page_down
T:KP_End:kp_end
T:KP_Begin:kp_begin
T:KP_Insert:kp_insert
T:KP_Delete:kp_delete
T:KP_Equal:[=]
T:KP_Multiply:[*]
T:KP_Add:[+]
T:KP_Comma:[,]
T:KP_Subtract:[-]
T:KP_Decimal:[.]
T:KP_Divide:[/]
T:KP_0:[0]
T:KP_1:[1]
T:KP_2:[2]
T:KP_3:[3]
T:KP_4:[4]
T:KP_5:[5]
T:KP_6:[6]
T:KP_7:[7]
T:KP_8:[8]
T:KP_9:[9]
T:F1:f1
T:F2:f2
T:F3:f3
T:F4:f4
T:F5:f5
T:F6:f6
T:F7:f7
T:F8:f8
T:F9:f9
T:F10:f10
T:F11:f11
T:F12:f12
T:F13:f13
T:F14:f14
T:F15:f15
T:F16:f16
T:F17:f17
T:F18:f18
T:F19:f19
T:F20:f20
T:F21:f21
T:F22:f22
T:F23:f23
T:F24:f24
T:F25:f25
T:F26:f26
T:F27:f27
T:F28:f28
T:F29:f29
T:F30:f30
T:F31:f31
T:F32:f32
T:F33:f33
T:F34:f34
T:F35:f35

T:\::\:
T:*:*
T:;:;
T:+:+
T:,:,
T:<:<
T:-:-
T:=:=
T:.:.
T:>:>
T:\/:\/
T:?:?
T:0:0
T:~:~
T:1:1
T:!:!
T:2:2
T:":"
T:3:3
T:#:#
T:4:4
T:$:$
T:5:5
T:%:%
T:6:6
T:&:&
T:7:7
T:\':\'
T:8:8
T:(:(
T:9:9
T:):)
T:@:@
T:`:`
T:A:a
T:B:b
T:C:c
T:D:d
T:E:e
T:F:f
T:G:g
T:H:h
T:I:i
T:J:j
T:K:k
T:L:l
T:M:m
T:N:n
T:O:o
T:P:p
T:Q:q
T:R:r
T:S:s
T:T:t
T:U:u
T:V:v
T:W:w
T:X:x
T:Y:y
T:Z:z
T:[:[
T:{:{
T:\\:\\
T:_:_
T:]:]
T:}:}
T:^:^
T:~:~
T:|:|



# Basic Arrow Movement

A:\x8D
P:^_[up]

A:\x8C
P:^_[right]

A:\x8B
P:^_[left]

A:\x8A
P:^_[down]


# Basic Arrows with Shift Down (run)

A:\a\\.8
P:^_S[up]

A:\a\\.6
P:^_S[right]

A:\a\\.4
P:^_S[left]

A:\a\\.2
P:^_S[down]


# Basic Arrows with Control Down (modify)

A:\a\\+8
P:^_C[up]

A:\a\\+6
P:^_C[right]

A:\a\\+4
P:^_C[left]

A:\a\\+2
P:^_C[down]


# Keypad

A:1
P:^_[[1]]

A:2
P:^_[[2]]

A:3
P:^_[[3]]

A:4
P:^_[[4]]

A:5
P:^_[[5]]

A:6
P:^_[[6]]

A:7
P:^_[[7]]

A:8
P:^_[[8]]

A:9
P:^_[[9]]

A:0
P:^_[[0]]

A:.
P:^_[kp_decimal]


# Keypad With Shift (run) - Num Lock on

A:\a\\.1
P:^_S[[1]]

A:\a\\.2
P:^_S[[2]]

A:\a\\.3
P:^_S[[3]]

A:\a\\.4
P:^_S[[4]]

A:\a\\.5
P:^_S[[5]]

A:\a\\.6
P:^_S[[6]]

A:\a\\.7
P:^_S[[7]]

A:\a\\.8
P:^_S[[8]]

A:\a\\.9
P:^_S[[9]]


# Keypad With Control (modify)

A:\a\\+1
P:^_C[[1]]

A:\a\\+2
P:^_C[[2]]

A:\a\\+3
P:^_C[[3]]

A:\a\\+4
P:^_C[[4]]

A:\a\\+5
P:^_C[[5]]

A:\a\\+6
P:^_C[[6]]

A:\a\\+7
P:^_C[[7]]

A:\a\\+8
P:^_C[[8]]

A:\a\\+9
P:^_C[[9]]



# Map the keypad enter to press return
A:\r
P:^_[enter]

