# File: pref-ibm.prf

#
# This file is used by Angband (when it was compiled using "main-ibm.c"
# or "main-dos.c" or "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-ibm.prf" and "main-dos.prf" files may not be able to recognize
# the "/" and "*" keys on the keypad, because it mistakenly classifies the
# "0x35" and "0x37" codes as the keycodes of "normal" keys.
#
# 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-ibm.c" and "main-dos.c" and "main-win.c" for more info.
#


#
# 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:8
P:^_x48\r

A:9
P:^_x49\r

A:-
P:^_x4A\r

A:4
P:^_x4B\r

A:5
P:^_x4C\r

A:6
P:^_x4D\r

A:+
P:^_x4E\r

A:1
P:^_x4F\r

A:2
P:^_x50\r

A:3
P:^_x51\r

A:0
P:^_x52\r

A:.
P:^_x53\r


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

A:\e\e\e
P:^_Sx35\r

A:\e\e\e
P:^_Sx37\r

A:\e\e\\.7
P:^_Sx47\r

A:\e\e\\.8
P:^_Sx48\r

A:\e\e\\.9
P:^_Sx49\r

A:\e\e\e
P:^_Sx4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