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

78 thoughts on “Custom Input Mapping

  1. Hi, How would you map an extra key to AutoFire under the Advanced Settings for when using the default keyboard input as a controller.
    I see you can do this with the ‘Lightning’ icon under Joystick & Mouse Port tab.

    However it’s nice in some games to have 2 keys to act as fire buttons. eg. Left Ctrl as normal fire and say Left Alt as autofire.
    Thank you.

    • I have this working::
      keyboard_key_rshift = action_joy_1_fire_button

      Is it possible to enable autofire on that somehow?
      Thank You.

      • never mind 🙂 Found the answer in the forums.
        keyboard_key_rshift = action_joy_1_autofire_button

        Thank you for your work on this project, best Amiga emulator experience by far!!

  2. I’m using win10 PC with vibration joystick plugged in, how can I map the control for Amiga CD32? I try to use the configuration you’ve already mentioned in the “Custom Input Mapping”, also tried to make a ini file in the “\FS-UAE\Controllers” but when the iso booted, it still requires me to config for the Amiga CD32 gamepad, and the keyboard still seems to register the default setting. I also tried to use joytokey to map the control indirectly but the directional keys don’t work. pls help me sir, thanks a lot, really appreciate your kind work for the new versions.

    • Hi, have you tried mapping the joystick via Launcher Settings -> Joysticks and Gamepads -> doubleclick on your joystick?

      You should probably also first undo all the manual configuration you’ve tried, otherwise there could be conflicts 🙂

  3. Can you map two different keyboards independently?

    For example:
    keyboard_1_key_a = a
    keyboard_2_key_a = joystick port 1 left

      • Hi. Per the above, I don’t think this will work, but I would love to be able to remap the arrow keys, per the following:

        keyboard_key_up = keyboard_key_leftbracket
        keyboard_key_down = keyboard_key_slash
        keyboard_key_right = keyboard_key_semicolon
        keyboard_key_left = keyboard_key_quote

        Basically remapping the movement keys for Antep, an Ultima-like shareware game.

        • No, that’s not correct, as you assumed. If you make it clearly what *host* key you want to press, and what emulated *Amiga* key that should result in, then I can help you 🙂

          • Hi again. I actually have a need for at least two games…

            Antep uses [ for up, ; for left, ‘ for right and / for down. I would like to remap those keys to the arrow keys so I can use the arrow keys instead.

            Zerg uses the numeric keypad, however my laptop does not have one. I would like to remap numpad 8, 4, 6 and 2 to the arrow keys.

            Thank you

          • Then you basically got the left part right (the host keys)! The right-hand side needs to be input action names, which you can find here: http://fs-uae.net/input-actions. I have provided a couple of examples for you.

            Example for Antep:

            keyboard_key_up = action_key_leftbracket

            Example for Zerg:

            keyboard_key_up = action_key_np_8

            And similar for the other arrow keys 🙂

          • Thanks for the help. I think I have most of it figured out… Two still don’t work in Antep though.

            Of the four arrow key remappings, two work:

            keyboard_key_up = action_key_leftbracket
            keyboard_key_left = action_key_semicolon

            But two do not:

            keyboard_key_down = action_key_slash
            keyboard_key_right = action_key_quote

            Am I missing something in my syntax?

            Thanks again

          • You probably want keyboard_key_right = action_key_singlequote. And down might be action_key_div. It depends what physical Amiga keys we are actually talking about. But try those suggestions first 🙂

  4. Hello,
    I am running a setup with FS-UAE 2.6.2, attached to WINUAE 3.3.0. This setup is working – games are running. I have build an arcade machine (2 players) that is using Maximus Arcade for running the emulated games – I have attached FS-UAE to this and its working – games are working.

    My main problem now is that I need to configure they key bindings for player 1 and 2 and game start keys. I have read through a lot of the documentation on your site, and tried different things – nothing works for me.

    I tried the example of setting up keys from this page, posted by “Danny” on 2016-04-24 (without the F12 line)
    – I have tried to create a default config file (it didnt exists) like this guide describes: https://fs-uae.net/configuration-files, and add the example code
    – I have tried to add the example code insite the FS-UAE launcher under Settings > Advanced Settings
    – I have tried to add the example code insite the FS-UAE launcher under Additional Configuration > Custom Configuration
    – I have tried to locate the .ini files explained in this post (https://fs-uae.net/custom-controller-configuration), but I couldn’t find any

    What I basically need is to map the keys like this:

    1 = start game with player 1
    2 = start game with player 2
    5 = add coin for player 1 (not sure if this is needed with amiga, I’m using it for mame emulation)
    6 = add coin for player 2 (not sure if this is needed with amiga, I’m using it for mame emulation)
    ESC = exit the game
    P = Pause the game

    Arrow left = Player 1 Down
    Arrow right = Player 1 Up
    Arrow up = Player 1 Left
    Arrow down = Player 1 Right
    Left CTRL = Player 1 fire button 1
    Left ALT = Player 1 fire button 2

    F = Player 2 Left
    R = Player 2 Right
    D = Player 2 Up
    G = Player 2 Down
    U = Player 2 fire button 1
    S = Player 2 fire button 2

    I am really lost, I feel stupid because I feel like I’m overlooking something basic and essential somewhere, and I hope you can help me in the right direction.

    Kind regards
    Thomas

  5. Hi

    This emulator is really cool but I’ve problem with simply keys configuration.

    I want to set:
    Q = up
    A = down
    O = left
    P = right
    SPACE = fire
    F12 = Y

    Could you help me with?
    Tnx

    • Ok I set up:

      keyboard_key_a = action_joy_1_down
      keyboard_key_f12 = keyboard_key_9
      keyboard_key_o = action_joy_1_left
      keyboard_key_p = action_joy_1_right
      keyboard_key_q = action_joy_1_up
      keyboard_key_space = action_joy_1_fire_button

      But
      I’ve problem with start game when is “Press 1 or 2 to start”

      and unlimited time or amor etc. *
      keyboard_key_f12 = keyboard_key_9 doesn’t works

      • Hi, regarding F12, are you running FS-UAE version 2.6.2? You need a version >= 2.7.3dev in order to be able to customize actions for the F12 key.

        I don’t understand that the problem with “Press 1 or 2 to start” is, please explain further!

Leave a Reply

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