Custom Input Mapping

All keyboard and joystick events can be mapped to any Amiga keyboard and joystick action, overriding default settings and (and the setup resulting from using the joystick_port_n options).Β A few examples of what you can do:

  • Do you want the key ‘S’ on your keyboard to press the ‘R’ key on the Amiga keyboard? You can do this with custom input mapping.
  • Do you want to create a setup where you can play Pinball Dreams with a game pad? You can map game pad buttons to the Amiga keyboardΒ F1, F2, F3, F4, cursor down, left shift and right shift keys.

General configuration

To map an action, you add a line like this to your configuration file:

devicename_eventname = actionname

Here is a specific example, mapping the keyboard key q to the fire button on the primary Amiga joystick (joy_1 is the joystick in joystick port 1):

keyboard_key_q = action_joy_1_fire_button

Input Actions

Examples of input actions are:

action_joy_1_fire_button          (fire button on joystick in port 1)
action_key_z                      (press amiga keyboard key Z)
action_drive_0_insert_floppy_0    (insert disk from floppy image list)

I have put the list of available actions on its own page due to the large number of actions.

Mapping Joystick Events

Here are the different types of event names you can use. joystick_0 is the first joystick connected, joystick_1 is the second, etc. Similarly, you can use button_0 (first button), button_1 (second button) and so on:

joystick_0_button_0
joystick_0_axis_0_neg
joystick_0_axis_0_pos
joystick_0_hat_0_up
joystick_0_hat_0_down
joystick_0_hat_0_left
joystick_0_hat_0_right

For most game pads with a proper universal configuration, you can use universal event names instead and make the configuration work identically even with different types of game pads connected. The above configuration is not suited for this, because button numbers have generally no relation to the physical placement of the game pad buttons.

Universal Event Names

With universal event names, you can map these events instead:

joystick_0_dpad_left
joystick_0_dpad_right
joystick_0_dpad_up
joystick_0_dpad_down
joystick_0_lstick_left
joystick_0_lstick_right
joystick_0_lstick_up
joystick_0_lstick_down
joystick_0_lstick_button
joystick_0_rstick_left
joystick_0_rstick_right
joystick_0_rstick_up
joystick_0_rstick_down
joystick_0_rstick_button
joystick_0_south_button
joystick_0_west_button
joystick_0_north_button
joystick_0_east_button
joystick_0_start_button
joystick_0_select_button
joystick_0_left_shoulder
joystick_0_right_shoulder
joystick_0_left_trigger
joystick_0_right_trigger

Matching a Joystick Device

To match a specific joystick device, you can either (as in the above examples) match joystick by number:

joystick_0
joystick_1
joystick_2
etc...

Or you can match devices by name:

logitech_dual_action_usb

The device name is the name of the device as it appears in your operating system, converted to lower case and all characters other than letters and numbers converted to underscores. Adjacent underscores are merged into one, and trailing underscores are stripped.

For instance, a device named:

Controller (Xbox 360 Wireless Receiver)

will be matched by:

controller_xbox_360_wireless_receiver

If you have more than game pad of the same model connected, you can match the other ones with:

logitech_dual_action_usb_2   (the second connected of this model)
logitech_dual_action_usb_3   (the third connected of this model)
etc...

More Examples

If you want to play Pinball Dreams with the first connected game pad, instead of using keyboard controls, you might want to map something like this:

joystick_0_left_shoulder = action_key_shift_left
joystick_0_right_shoulder = action_key_shift_right
joystick_0_north_button = action_key_f1
joystick_0_dpad_down = action_key_cursor_down

Along with a few more actions, such as mappings for amiga keys F2, F3, F4 and Space.

Mapping Keyboard Keys

Here are the names of all the keyboard events you can trigger on. Please note that not all events are valid for all keyboards. Also, keys are named after the corresponding physical key on English keyboard layouts!

keyboard_key_backspace
keyboard_key_tab
keyboard_key_clear
keyboard_key_return
keyboard_key_pause
keyboard_key_escape
keyboard_key_space
keyboard_key_exclaim
keyboard_key_quotedbl
keyboard_key_hash
keyboard_key_dollar
keyboard_key_ampersand
keyboard_key_quote
keyboard_key_leftparen
keyboard_key_rightparen
keyboard_key_asterisk
keyboard_key_plus
keyboard_key_comma
keyboard_key_minus
keyboard_key_period
keyboard_key_slash
keyboard_key_0
keyboard_key_1
keyboard_key_2
keyboard_key_3
keyboard_key_4
keyboard_key_5
keyboard_key_6
keyboard_key_7
keyboard_key_8
keyboard_key_9
keyboard_key_colon
keyboard_key_semicolon
keyboard_key_less
keyboard_key_equals
keyboard_key_greater
keyboard_key_question
keyboard_key_at
keyboard_key_leftbracket
keyboard_key_backslash
keyboard_key_rightbracket
keyboard_key_caret
keyboard_key_underscore
keyboard_key_backquote
keyboard_key_a
keyboard_key_b
keyboard_key_c
keyboard_key_d
keyboard_key_e
keyboard_key_f
keyboard_key_g
keyboard_key_h
keyboard_key_i
keyboard_key_j
keyboard_key_k
keyboard_key_l
keyboard_key_m
keyboard_key_n
keyboard_key_o
keyboard_key_p
keyboard_key_q
keyboard_key_r
keyboard_key_s
keyboard_key_t
keyboard_key_u
keyboard_key_v
keyboard_key_w
keyboard_key_x
keyboard_key_y
keyboard_key_z
keyboard_key_kp0
keyboard_key_kp1
keyboard_key_kp2
keyboard_key_kp3
keyboard_key_kp4
keyboard_key_kp5
keyboard_key_kp6
keyboard_key_kp7
keyboard_key_kp8
keyboard_key_kp9
keyboard_key_kp_period
keyboard_key_kp_divide
keyboard_key_kp_multiply
keyboard_key_kp_minus
keyboard_key_kp_plus
keyboard_key_kp_enter
keyboard_key_kp_equals
keyboard_key_up
keyboard_key_down
keyboard_key_right
keyboard_key_left
keyboard_key_insert
keyboard_key_delete
keyboard_key_home
keyboard_key_end
keyboard_key_pageup
keyboard_key_pagedown
keyboard_key_f1
keyboard_key_f2
keyboard_key_f3
keyboard_key_f4
keyboard_key_f5
keyboard_key_f6
keyboard_key_f7
keyboard_key_f8
keyboard_key_f9
keyboard_key_f10
keyboard_key_f11
keyboard_key_f12
keyboard_key_f13
keyboard_key_f14
keyboard_key_f15
keyboard_key_numlock
keyboard_key_capslock
keyboard_key_scrollock
keyboard_key_rshift
keyboard_key_lshift
keyboard_key_rctrl
keyboard_key_lctrl
keyboard_key_ralt
keyboard_key_lalt
keyboard_key_lsuper
keyboard_key_rsuper
keyboard_key_help
keyboard_key_print
keyboard_key_sysreq
keyboard_key_break
keyboard_key_menu
keyboard_key_power
keyboard_key_euro
keyboard_key_undo

90 thoughts on “Custom Input Mapping

  1. Hi All!

    I have a problem with the action replay. I use the fs-uae launcher and already configured all f*ckin config files , I have the all action replay rom (I already used in WinUAE) but here, I’m not able to use it. The right path in the config keyboard mapped but does not work. I pressed the F12+A but nothing happened.

    Can someone to help me for mapping the Action Replay rom? I have AR rom in a directory but i can’t map it. I tried but nothin happened. It is in the config file :

    uae_cart_file = D:\\amiga\\actionreplay\\
    keyboard_key_pageup = action_activate_cartridge

    Any idea? Thanks!

    • You need to provide the path to the ROM file, not just to the directory where it is stored.

      • Do u mean this one? :

        uae_cart_file = C:\\Users\\Roxy_2\\Documents\\FS-UAE\\Kickstarts\\ar3.rom
        keyboard_key_tab = action_activate_cartridge

        Thanks anyway! πŸ™‚

  2. Hi Frode!

    I’ve a question concerning customs keyboard mapping.

    I couldn’t find the ‘#’ character with the default settings of FS-UAE (Linux Mint 17.2 Xfce). Unfortunately I have a small Lenovo X130 (Laptop) with German layout, and I also couldn’t figure it out how to map it.

    Best for me would be to map it on “Pos1” key since this key is mapped redundantly to ‘num_pad_)’ by default – so It would be free for remapping.
    Of course there is no such ‘keyboard_key_pos1’ listed also the ‘action_key_hash’ is not existent.

    Any suggestion?

    Additional Q:
    What is meant by ‘action_key_70’ – can’t find the raw key-code but the ascii for ‘p’?

    BTW.: Thanks for the wonderful FS-UAE – I now finally can switch completely to Linux. Decent Amiga-emulation was the only reason to stay on Win. Great!

    Thank you!

    • Hi, what key you need to press in order to get the ‘#’ symbol is dependent on your keyboard layout settings in Workbench. If you haven’t changed it, your Workbench is probably configured to use US keyboard layout, in which case you need to look at a picture of a US Amiga keyboard in order to figure out what key to press: http://www.amiga-games.com/img/AMIGA/AMIGA_4000/amiga_4000_25_large.jpg.

      As you can see on the picture, # is typed by pressing Shift+3. There isn’t an action_key_hash because the key names are derived from English keys, and there is no dedicated hash key.

      On the other hand, if you have changed your keyboard layout in Workbench to German, you would normally need to press the key next to Return, as seen in this image: http://www.bigbookofamigahardware.com/bboah/media/download_photos/a4000keyb_german_big.jpg. But, Amiga keyboard also have one more key on the number row than PC keyboards have, and in the latest FS-UAE version, the “backslash” key from the Amiga number row has been moved to the key next to Return, and instead, you need to press the “Insert” key on your keyboard to get the # symbol (again, if you have configured a German Amiga keyboard).

      (action_key_70 refers to the key with Amiga scan code 0x70, which I do not think exists on original Amiga keyboards).

    • Hey, I found the # key it’s ‘action_key_2b’
      Great, thanks – that’s all I need for now I’m happy!

      • Correct -For Amiga German layouts, that’s the ‘#’ key πŸ™‚

        If you want to have this on the key next to the Return key, you can change “Host Key BACKSLASH” in FS-UAE Launcher settings to “Amiga Key 0x2B” (in the latest beta/dev versions). But if so, you should also move “Amiga Key Backslash” to for example “Host Key INSERT”.

  3. Hello, is it possible to map a keyboard key to a mouse button? I would like my right mouse button to function as the P key. Thank you!

  4. I’m trying to map the spacebar to my joypad for Flashback so I can get the gun out.
    In default.fs-uae I tried:
    joystick_0_west_button = keyboard_key_space //going by documentation
    usb_gamepad_10_2_0_0_linux_west_button = keyboard_key_space //going by a name I found in the logs

    I also tried in the Controllers/usb_gamepad_10_2_0_0_linux.conf:
    usb_gamepad_10_2_0_0_linux_west_button =keyboard_key_space

    Am I even close? πŸ™‚

    • You’re kind of close πŸ™‚ -But you need to use action_key_space! (keyboard_key_space is referring to the host keyboard space key, while action_key_space is the Amiga space key) One of the following should work fine:

      joystick_0_west_button = action_key_space or usb_gamepad_10_2_0_0_linux_west_button = action_key_space

  5. Hi Frode I would like to use wasd instead of the directional keys, as my hands get cramped using the directional buttons on the bottom of my keyboard. For instance I have tried to change the up button to w using the code below, but it results in neither w nor the up key working:

    keyboard_key_up = action_key_w

    Do you have any ideas? I am using the latest Dev version.

    Cheers, Alex

  6. Hi Frode, say you have a 3 player game like Nitro, where with a real life Amiga you can have two joysticks plugged in, plus one guy would play using the keyboard. Using FS-UAE, how would I go about using 3 joysticks? I have tried the following config, but I couldn’t get the 3rd joystick to work:

    joystick_port_0 = xinput controller #2
    joystick_port_0_mode = joystick

    joystick_port_1 = xinput controller
    joystick_port_1_mode = joystick

    joystick_port_2 = xinput controller #3
    joystick_port_2_mode = joystick

    Cheers, Alex

    • Figured it out!

      joystick_port_0 = xinput controller #2
      joystick_port_0_mode = joystick

      joystick_port_1 = xinput controller
      joystick_port_1_mode = joystick

      joystick_port_2 = xinput controller #3
      joystick_port_2_mode = joystick
      joystick_2_south_button = action_key_shift_right
      joystick_2_lstick_left = action_key_x
      joystick_2_lstick_right = action_key_z

      • Great, the solution you found there should work great for you πŸ™‚

        Just remember that the “third joystick” isn’t a joystick at all as far as the Amiga is concerned (you have just mapped host joystick buttons to Amiga keyboard keys). So your joystick_port_2 / joystick_port_2_mode doesn’t do anything useful in this case and can/should be removed. The options joystick_port_2/3 are for use with games which supports up to 4 Amiga joysticks via a parallel port adapter.

  7. Hi. I have an old Amiga 600 on which I am trying to
    do some basic programming but I can’t find the exclamtion
    marks. They are on the keybord but but print a different
    character.
    hope you can help.
    thanks.
    graham.

    • Hi, a bit off-topic for FS-UAE input mapping page if the question is about a real Amiga 600. Anyway, if what symbols you get when pressing keys do not match what is written on your real Amiga keyboard, then the problem is probably just that you’ve got an incorrect keymap activated in Workbench. For example, perhaps your WB keymap is for a US keyboard, while you have another national keyboard variant. If Workbench thinks you have a US keyboard, refer to this image for symbols: http://3.bp.blogspot.com/–tiRijbpC6A/U0TWXqXJbII/AAAAAAAAFLM/A6QQVwdVXgU/s1600/$_573.jpg (image of an US A600, I think).

  8. I’ve tried every possible combination of entering

    keyboard_key_w = keyboard_key_kp8
    keyboard_key_x = keyboard_key_z

    in advanced settings and custom configuration to see if I can remap the keyboard. Nothing works. I’ve also tried this on a PC as well as a Mac. Still doesn’t work. I don’t understand what I’m supposed to do.

    • Try the following instead (as noted in the documentation, you need to use devicename_eventname = actionname):
      keyboard_key_w = action_key_np_8
      keyboard_key_x = action_key_x

      • Ah, thanks. I didn’t understand that “action” was a required part of the name.

        However, the documentation doesn’t say

        key_np_8

        it says

        key_kp8

        Which will obviously cause some confusion. Thanks again for the help – everything appears to be fine now..

        • No, the action_ prefix is included in the documentation too. I have put the list of available actions on its own page due to the large number of actions. action_key_np_8 is listed on that page along with the other possible actions.

  9. Hello!

    Is it possible to assign actions to joystick button combos? I’d like to do something like this:

    joystick_0_right_shoulder + joystick_0_left_shoulder = action_restore_state_1

    Less chance of accidentally restoring state 1 that way.

    • Sorry, there’s no such functionality at this time. It’s a good idea though, perhaps it will be possible in the future if I reword the input system.

Leave a Reply

Your email address will not be published. Required fields are marked *