# File: pref-win.prf

#
# This file is used by Angband (when it was compiled using "main-win.c")
# to specify various "user preferences", including "macros".
#
# This file defines some basic macros, which allow the use of the "keypad",
# alone, and with the shift and/or control modifier keys.  All "special"
# keys are translated by "main-ibm.c" (or "main-win.c") into special "macro
# triggers" of the encoded form "^_MMMxSS\r", where the "modifier" flags are
# stored in "MMM", and the two digit hexidecimal scan code of the keypress is
# stored in "SS".
#
# The "main-win.prf" file should not be using the final "control + keypad"
# section in this file, it was created for "main-ibm.c" and "main-dos.c".
#
# The "main-win.prf" file may actually send the "ascii" equivalent of some
# keypad keys after the keypad key itself, especially if "numlock" is down,
# which may cause problems.  Or it may not, it is hard to tell.  This is bad.
#
# See "main-win.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:&x#:CSA:control-:shift-:alt-

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

# These keycodes are actually direct keyboard scan code taken from the 'dinput.h'.

T:-:0C
T:=:0D
T:[:1A
T:]:1B
T:;:27
T:\':28
T:`:29
T:\\:2B
T:,:33
T:.:34
T:\/:35
T:1:02
T:2:03
T:3:04
T:4:05
T:5:06
T:6:07
T:7:08
T:8:09
T:9:0A
T:0:0B
T:Backspace:0E
T:Q:10
T:W:11
T:E:12
T:R:13
T:T:14
T:Y:15
T:U:16
T:I:17
T:O:18
T:P:19
T:Enter:1C
T:A:1E
T:S:1F
T:D:20
T:F:21
T:G:22
T:H:23
T:J:24
T:K:25
T:L:26
T:Zenkaku_Hankaku:29
T:Z:2C
T:X:2D
T:C:2E
T:V:2F
T:B:30
T:N:31
T:M:32
T:KP_Multiply:37
T:CapsLock:3A
T:F1:3B
T:F2:3C
T:F3:3D
T:F4:3E
T:F5:3F
T:F6:40
T:F7:41
T:F8:42
T:F9:43
T:F10:44
T:Numlock:45
T:Scroll:46
#T:KP_7:47
T:Home:47
#T:KP_8:48
T:Up:48
#T:KP_9:49
T:Page_Up:49
T:KP_Subtract:4A
#T:KP_4:4B
T:Left:4B
T:KP_5:4C
#T:KP_6:4D
T:Right:4D
T:KP_Add:4E
#T:KP_1:4F
T:End:4F
#T:KP_2:50
T:Down:50
#T:KP_3:51
T:Page_Down:51
#T:KP_0:52
T:Insert:52
#T:KP_Decimal:53
T:Delete:53
T:Oem_102:56
T:F11:57
T:F12:58
T:Menu:5D
T:F13:64
T:F14:65
T:F15:66
T:Hiragana_Katakana:70
T:Abnt_C1:73
T:Henkan:79
T:Muhenkan:7B
T:Yen:7D
T:Abnt_C2:7E
T:KP_equals:8D
T:Prevtrack:90
T:Kanji:94
T:Stop:95
T:Ax:96
T:Unlabeled:97
T:Nexttrack:99
T:KP_Enter:9C
T:Mute:A0
T:Calculator:A1
T:Playpause:A2
T:Mediastop:A4
T:Volumedown:AE
T:Volumeup:B0
T:Webhome:B2
T:KP_Comma:B3
T:KP_Divide:B5
T:Sys_Req:B7
T:Pause:C5
#T:Home:C7
#T:Up:C8
#T:Prior:C9
#T:Left:CB
#T:Right:CD
#T:End:CF
#T:Down:D0
#T:Next:D1
#T:Insert:D2
#T:Delete:D3
T:Lwin:DB
T:Rwin:DC
T:Apps:DD
T:Power:DE
T:Sleep:DF
T:Wake:E3
T:Websearch:E5
T:Webfavorites:E6
T:Webrefresh:E7
T:Webstop:E8
T:Webforward:E9
T:Webback:EA
T:Mycomputer:EB
T:Mail:EC
T:Mediaselect:ED


#
# Hack -- Some foreign keyboards have a special key on the keyboard, which
# is used to generate the "<", ">", and "|" keys (alone, shifted, alt-ed).
#

A:<
P:^_x56\r

A:>
P:^_Sx56\r

A:|
P:^_Ax56\r


#
# Keypad (/,*,7,8,9,-,4,5,6,+,1,2,3,0,.)
#

A:/
P:^_x35\r

A:*
P:^_x37\r

A:7
P:^_x47\r

A:\x8D
P:^_x48\r

A:9
P:^_x49\r

A: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