### Wiimotes (1 to 4) ###

# The button mappings differ depending on the extension controller attached.
#
# Button      None  Nunchuk  Classic  Guitar Hero 3
# ---------------------------------------------------
# A           1     11       23       47
# B           2     12       24       48
# 1           3     13       25       49
# 2           4     14       26       50
# Left        5     15       27       51
# Right       6     16       28       52
# Up          7     17       29       53
# Down        8     18       30       54
# Minus       9     19       31       55
# Plus        10    20       32       56
#
# C           -     21       -        -
# Z           -     22       -        -
#
# a           -     -        33       -
# b           -     -        34       -
# x           -     -        35       -
# y           -     -        36       -
# L           -     -        37       -
# R           -     -        38       -
# ZL          -     -        39       -
# ZR          -     -        40       -
# Left        -     -        41       -
# Right       -     -        42       -
# Up          -     -        43       -
# Down        -     -        44       -
# Select      -     -        45       -
# Start       -     -        46       -
#
# Green       -     -        -        57
# Red         -     -        -        58
# Yellow      -     -        -        59
# Blue        -     -        -        60
# Orange      -     -        -        61
# Strum Up    -     -        -        62
# Strum Down  -     -        -        63
# Minus       -     -        -        64
# Plus        -     -        -        65
#
# The home buttons on the Wiimote and the Classic Controller are currently
# hardcoded to the escape key.
#
# 1/2 Nunchuk
# 3/4 Classic L
# 5/6 Classic R
# 7/8 Guitar stick
# 9   Guitar whammy bar (positive only)

# None
joy1button1 = 284
joy1button2 = 285
joy1button3 = 13
joy1button4 = 32
joy1button5 = 274
joy1button6 = 273
joy1button7 = 276
joy1button8 = 275
joy1button9 = 115
joy1button10 = 112

# Nunchuk
joy1axis1 = 276, 275
joy1axis2 = 273, 274
joy1button11 = 32
joy1button12 = 13
joy1button13 = 284
joy1button14 = 285
joy1button15 = 276
joy1button16 = 275
joy1button17 = 273
joy1button18 = 274
joy1button19 = 115
joy1button20 = 112
joy1button21 = 127
joy1button22 = 32

# Classic
joy1axis3 = 276, 275
joy1axis4 = 273, 274
joy1axis5 = 276, 275
joy1axis6 = 273, 274
joy1button33 = 32
joy1button34 = 13
joy1button35 = 115
joy1button36 = 127
joy1button37 = 284
joy1button38 = 285
joy1button39 = 27
joy1button40 = 27
joy1button41 = 276
joy1button42 = 275
joy1button43 = 273
joy1button44 = 274
joy1button45 = 27
joy1button46 = 112

# Guitar Hero 3
joy1axis7 = 276, 275
joy1axis8 = 273, 274
joy1axis9 = 0, 127
joy1button57 = 32
joy1button58 = 13
joy1button59 = 115
joy1button60 = 284
joy1button61 = 285
joy1button62 = 273
joy1button63 = 274
joy1button64 = 27
joy1button65 = 112

### GameCube controllers (5 to 8) ###

#  1 A
#  2 B
#  3 X
#  4 Y
#  5 L
#  6 R
#  7 Z
#  8 Left
#  9 Right
# 10 Up
# 11 Down
# 12 Start/Pause

# 1/2 Analog stick
# 3/4 C stick

joy5axis1 = 276, 275
joy5axis2 = 273, 274
joy5axis3 = 276, 275
joy5axis4 = 273, 274
joy5button1 = 32
joy5button2 = 13
joy5button3 = 115
joy5button4 = 127
joy5button5 = 284
joy5button6 = 285
joy5button7 = 27
joy5button8 = 276
joy5button9 = 275
joy5button10 = 273
joy5button11 = 274
joy5button12 = 112