# File: pref.prf

#
# This file defines "default" actions of various kinds
#
# This file includes, if appropriate, various "sub-files"
#
# See "docs/customize.rst" and "src/ui-prefs.c" for more information.
#
# Note that the "x" key is mapped in the original keyset to the key sequence
# "w0", which will "swap weapons" as long as both weapons contain the
# inscription "@0".  For example, inscribe your main weapon as "@1@0"
# and your secondary weapon as "@2@0".  There isn't a similar keymap for the
# rogue-like keyset (previously had "X" mapped to "w0" for both keysets).
#

# Movement
keymap-act:;1
keymap-input:0:1
keymap-input:1:1
keymap-input:0:{K}1
keymap-input:1:{K}1
keymap-input:0:{MK}1
keymap-input:1:{MK}1
keymap-input:0:[End]
keymap-input:1:[End]
keymap-input:0:{K}[End]
keymap-input:1:{K}[End]
keymap-input:0:{MK}[End]
keymap-input:1:{MK}[End]
keymap-act:;2
keymap-input:0:2
keymap-input:1:2
keymap-input:0:{K}2
keymap-input:1:{K}2
keymap-input:0:{MK}2
keymap-input:1:{MK}2
keymap-input:0:[Down]
keymap-input:1:[Down]
keymap-input:0:{K}[Down]
keymap-input:1:{K}[Down]
keymap-input:0:{MK}[Down]
keymap-input:1:{MK}[Down]
keymap-act:;3
keymap-input:0:3
keymap-input:1:3
keymap-input:0:{K}3
keymap-input:1:{K}3
keymap-input:0:{MK}3
keymap-input:1:{MK}3
keymap-input:0:[PageDown]
keymap-input:1:[PageDown]
keymap-input:0:{K}[PageDown]
keymap-input:1:{K}[PageDown]
keymap-input:0:{MK}[PageDown]
keymap-input:1:{MK}[PageDown]
keymap-act:;4
keymap-input:0:4
keymap-input:1:4
keymap-input:0:{K}4
keymap-input:1:{K}4
keymap-input:0:{MK}4
keymap-input:1:{MK}4
keymap-input:0:[Left]
keymap-input:1:[Left]
keymap-input:0:{K}[Left]
keymap-input:1:{K}[Left]
keymap-input:0:{MK}[Left]
keymap-input:1:{MK}[Left]
keymap-act:;6
keymap-input:0:6
keymap-input:1:6
keymap-input:0:{K}6
keymap-input:1:{K}6
keymap-input:0:{MK}6
keymap-input:1:{MK}6
keymap-input:0:[Right]
keymap-input:1:[Right]
keymap-input:0:{K}[Right]
keymap-input:1:{K}[Right]
keymap-input:0:{MK}[Right]
keymap-input:1:{MK}[Right]
keymap-act:;7
keymap-input:0:7
keymap-input:1:7
keymap-input:0:{K}7
keymap-input:1:{K}7
keymap-input:0:{MK}7
keymap-input:1:{MK}7
keymap-input:0:[Home]
keymap-input:1:[Home]
keymap-input:0:{K}[Home]
keymap-input:1:{K}[Home]
keymap-input:0:{MK}[Home]
keymap-input:1:{MK}[Home]
keymap-act:;8
keymap-input:0:8
keymap-input:1:8
keymap-input:0:{K}8
keymap-input:1:{K}8
keymap-input:0:{MK}8
keymap-input:1:{MK}8
keymap-input:0:[Up]
keymap-input:1:[Up]
keymap-input:0:{K}[Up]
keymap-input:1:{K}[Up]
keymap-input:0:{MK}[Up]
keymap-input:1:{MK}[Up]
keymap-act:;9
keymap-input:0:9
keymap-input:1:9
keymap-input:0:{K}9
keymap-input:1:{K}9
keymap-input:0:{MK}9
keymap-input:1:{MK}9
keymap-input:0:[PageUp]
keymap-input:1:[PageUp]
keymap-input:0:{K}[PageUp]
keymap-input:1:{K}[PageUp]
keymap-input:0:{MK}[PageUp]
keymap-input:1:{MK}[PageUp]

# Running
keymap-act:.1
keymap-input:0:{S}[End]
keymap-input:0:{SK}1
keymap-input:0:{SK}[End]
keymap-input:0:{SMK}[End]
keymap-act:,1
keymap-input:1:{S}[End]
keymap-input:1:{SK}1
keymap-input:1:{SK}[End]
keymap-input:1:{SMK}[End]
keymap-act:.2
keymap-input:0:{S}[Down]
keymap-input:0:{SK}2
keymap-input:0:{SK}[Down]
keymap-input:0:{SMK}[Down]
keymap-act:,2
keymap-input:1:{S}[Down]
keymap-input:1:{SK}2
keymap-input:1:{SK}[Down]
keymap-input:1:{SMK}[Down]
keymap-act:.3
keymap-input:0:{S}[PageDown]
keymap-input:0:{SK}3
keymap-input:0:{SK}[PageDown]
keymap-input:0:{SMK}[PageDown]
keymap-act:,3
keymap-input:1:{S}[PageDown]
keymap-input:1:{SK}3
keymap-input:1:{SK}[PageDown]
keymap-input:1:{SMK}[PageDown]
keymap-act:.4
keymap-input:0:{S}[Left]
keymap-input:0:{SK}4
keymap-input:0:{SK}[Left]
keymap-input:0:{SMK}[Left]
keymap-act:,4
keymap-input:1:{S}[Left]
keymap-input:1:{SK}4
keymap-input:1:{SK}[Left]
keymap-input:1:{SMK}[Left]
keymap-act:.6
keymap-input:0:{S}[Right]
keymap-input:0:{SK}6
keymap-input:0:{SK}[Right]
keymap-input:0:{SMK}[Right]
keymap-act:,6
keymap-input:1:{S}[Right]
keymap-input:1:{SK}6
keymap-input:1:{SK}[Right]
keymap-input:1:{SMK}[Right]
keymap-act:.7
keymap-input:0:{S}[Home]
keymap-input:0:{SK}7
keymap-input:0:{SK}[Home]
keymap-input:0:{SMK}[Home]
keymap-act:,7
keymap-input:1:{S}[Home]
keymap-input:1:{SK}7
keymap-input:1:{SK}[Home]
keymap-input:1:{SMK}[Home]
keymap-act:.8
keymap-input:0:{S}[Up]
keymap-input:0:{SK}8
keymap-input:0:{SK}[Up]
keymap-input:0:{SMK}[Up]
keymap-act:,8
keymap-input:1:{S}[Up]
keymap-input:1:{SK}8
keymap-input:1:{SK}[Up]
keymap-input:1:{SMK}[Up]
keymap-act:.9
keymap-input:0:{S}[PageUp]
keymap-input:0:{SK}9
keymap-input:0:{SK}[PageUp]
keymap-input:0:{SMK}[PageUp]
keymap-act:,9
keymap-input:1:{S}[PageUp]
keymap-input:1:{SK}9
keymap-input:1:{SK}[PageUp]
keymap-input:1:{SMK}[PageUp]

# Tunneling
keymap-act:+1
keymap-input:0:^[End]
keymap-input:1:^[End]
keymap-input:0:{^K}1
keymap-input:1:{^K}1
keymap-input:0:{^MK}1
keymap-input:1:{^MK}1
keymap-input:0:{^K}[End]
keymap-input:1:{^K}[End]
keymap-act:+2
keymap-input:0:^[Down]
keymap-input:1:^[Down]
keymap-input:0:{^K}2
keymap-input:1:{^K}2
keymap-input:0:{^MK}2
keymap-input:1:{^MK}2
keymap-input:0:{^K}[Down]
keymap-input:1:{^K}[Down]
keymap-act:+3
keymap-input:0:^[PageDown]
keymap-input:1:^[PageDown]
keymap-input:0:{^K}3
keymap-input:1:{^K}3
keymap-input:0:{^MK}3
keymap-input:1:{^MK}3
keymap-input:0:{^K}[PageDown]
keymap-input:1:{^K}[PageDown]
keymap-act:+4
keymap-input:0:^[Left]
keymap-input:1:^[Left]
keymap-input:0:{^K}4
keymap-input:1:{^K}4
keymap-input:0:{^MK}4
keymap-input:1:{^MK}4
keymap-input:0:{^K}[Left]
keymap-input:1:{^K}[Left]
keymap-act:+6
keymap-input:0:^[Right]
keymap-input:1:^[Right]
keymap-input:0:{^K}6
keymap-input:1:{^K}6
keymap-input:0:{^MK}6
keymap-input:1:{^MK}6
keymap-input:0:{^K}[Right]
keymap-input:1:{^K}[Right]
keymap-act:+7
keymap-input:0:^[Home]
keymap-input:1:^[Home]
keymap-input:0:{^K}7
keymap-input:1:{^K}7
keymap-input:0:{^MK}7
keymap-input:1:{^MK}7
keymap-input:0:{^K}[Home]
keymap-input:1:{^K}[Home]
keymap-act:+8
keymap-input:0:^[Up]
keymap-input:1:^[Up]
keymap-input:0:{^K}8
keymap-input:1:{^K}8
keymap-input:0:{^MK}8
keymap-input:1:{^MK}8
keymap-input:0:{^K}[Up]
keymap-input:1:{^K}[Up]
keymap-act:+9
keymap-input:0:^[PageUp]
keymap-input:1:^[PageUp]
keymap-input:0:{^K}9
keymap-input:1:{^K}9
keymap-input:0:{^MK}9
keymap-input:1:{^MK}9
keymap-input:0:{^K}[PageUp]
keymap-input:1:{^K}[PageUp]


##### Original Keyset Mappings #####

# Stay still (numerical)
keymap-act:,
keymap-input:0:5
keymap-input:0:{K}5
keymap-input:0:{MK}5
keymap-input:0:{K}[Begin]
keymap-input:0:{MK}[Begin]

# Hack -- Swap equipment
keymap-act:w0
keymap-input:0:x

##### Roguelike Keyset Mappings #####

# Stay still (numerical)
keymap-act:.
keymap-input:1:5
keymap-input:1:{K}5
keymap-input:1:{MK}5
keymap-input:1:{K}[Begin]
keymap-input:1:{MK}[Begin]

# Movement (rogue keys)
keymap-act:;1
keymap-input:1:b
keymap-act:;2
keymap-input:1:j
keymap-act:;3
keymap-input:1:n
keymap-act:;4
keymap-input:1:h
keymap-act:;6
keymap-input:1:l
keymap-act:;7
keymap-input:1:y
keymap-act:;8
keymap-input:1:k
keymap-act:;9
keymap-input:1:u

# Running (shift + rogue keys)
keymap-act:,1
keymap-input:1:B
keymap-act:,2
keymap-input:1:J
keymap-act:,3
keymap-input:1:N
keymap-act:,4
keymap-input:1:H
keymap-act:,6
keymap-input:1:L
keymap-act:,7
keymap-input:1:Y
keymap-act:,8
keymap-input:1:K
keymap-act:,9
keymap-input:1:U

# Altering (control + rogue keys)
keymap-act:+1
keymap-input:1:^B
keymap-act:+2
keymap-input:1:^J
keymap-act:+3
keymap-input:1:^N
keymap-act:+4
keymap-input:1:^H
keymap-act:+6
keymap-input:1:^L
keymap-act:+7
keymap-input:1:^Y
keymap-act:+8
keymap-input:1:^K
keymap-act:+9
keymap-input:1:^U

# Message colors
%:message.prf

# Message sounds
%:sound.prf

##### System Specific Subfiles #####

?:[EQU $SYS gcu]
%:keys-gcu.prf

?:1
