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

    • I don’t do videos, but screenshots are no problem πŸ™‚ Is there anything in particular you have trouble with?

  1. Hi, I’ve been trying to trigger the right Ctrl action when ‘y’ is pressed, but it doesn’t work. Did I understand correctly that putting the following to the [config] section of the configuration should work?

    keyboard_key_y = action_key_ctrl_right

    Also tried to see if my German key layout might be the problem (where y and z are switched) but it also doesn’t work. Thx DJ

    • Actually… most times the biggest problem sits in front of the computer.
      I didn’t want to emulate Right Control but the Fire button on Joystick 1 – which works, but the mapping is actually not “y” but “z” like I assumed is true for German keyboard layout.

      One thing though: I can’t find an action to emulate pressing a mouse button on the Amiga. Does it exist?

      • Yes, there’s no action_key_ctrl_right as the Amiga does not have such as key πŸ™‚ And the keys are positionally mapped, so yes, you need to think in terms of an “English” / International keyboard layout.

        Left mouse button is the same action as fire button on joystick 1!

  2. Pingback: Fails to find disk 2 - English Amiga Board

  3. First of all well done, finally a totally user friendly UAE on Mac!
    I do have a question though: how are the F1-F12 keys emulated? Both in windowed and fullscreen I still get the mac functions rather than the functions programmed for the Amiga for that particular app or game.

    Would be nice to be using function keys for my emulated Amiga…

    • Hi, and thanks πŸ™‚

      The Amiga F-keys are directly passed through from the host F-keys (F1-F10). This requires that the keyboard keys on your keyboard does in fact send F key presses, which unfortunately is not the case on Mac by default. Someone decided that they should have other functions by default… So you may need to combine for example F1 with the Fn key to get a real F1 key press. This problem has crept up on other PC laptops as well.

      There is a system setting in OS X preferences where you can change the default so F keys are infact F keys by default. Also, I believe there are OS X apps available which can change this on a per-app basis.

      So in short, either:
      – Combine with the Fn key (or F-lock or similar)
      – Toggle the default setting (in BIOS, or OS X settings) so “F-keys” are F-keys.
      – Use a program to enable F-keys for specific programs such as FS-UAE.

  4. Is there a mapping for the | key? I can’t see it listed above. I want to map this key on my Mac keyboard to an Amiga Key. I think that it is sometimed called a Verticle Bar and you make it on a Mac keyboard by pressing SHIFT and \

    • Hi, the name of the key depends on what (international) keyboard layout you have. There will not be a separate name for the “|” symbol if shift needs to be pressed to get it. You would then rather have to map keyboard_key_shift_name where name is the name of the “unshifted” key. I can probably help you with the key name if you post a link to an image showing your keyboard layout.

      • OK, thanks for the reply Frode. I’ll try using ‘keyboard_key_shift_backslash’ as works on my keyboard.

  5. Hi ! Thanks a lot for your work !

    I have to map quite a few keys as I use an I-Pac on my system (home-made arcade cabinet). For instance, if I try to add the following to the relevant config file :

    keyboard_key_lctrl = action_joy_1_fire_button

    It makes no difference at all. Any idea ? (Kubuntu user)

    • This looks correct if left control was supposed to trigger the fire button for the main joystick. Remember that joystick_port_1_mode must still be “joystick” (and not “none”) when you use such mapping – or the Amiga will not see any joystick events – but the host device can be “nothing” if you map all joystick port actions individually…

  6. I must be slow or something but I can’t seem to get this Logitech Dual Action controller to work at all with FS-UAE. I load up Battle Squadron and all I can get is fire button works for the player 2 as if using a mouse. The trackpad I use makes player 2 move but I want the joystick to move player 1 and fire also. Maybe you could walk me through setup? I don’t know where to put all the commands listed here like for example:
    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
    Where do I enter these commands?

    • The joystick should work out of the box, you don’t need those commands. It simply sounds like you have “inserted” the Logitech Dual Action controller in the wrong port (port 0 / the mouse port). Try using it with Port 1 instead πŸ™‚

      • Still no go. I tried everything I can think of and at one point I got the joystick to switch to GUI menu in program by pushing hat switch to the left as if I were hitting f-12. But that’s it. Do I need a joystick setup program on my Mac to configure my joystick for fs-uae v.2.1.3 ?

        • Please try with the latest version, FS-UAE 2.2.0 πŸ™‚ Logitech Dual Action should still ideally work out of the box (it does here), but you can configure the gamepad via FS-UAE Launcher if necessary (there’s a joystick configuration tool in the menu).

          • Well, I got the 2.20 version and finally got the joystick working. Used the joystick configuration tool.
            But now, I can’t get multi disk games to load or see the other disks once it asks for them.

          • I recommend you use the “Select Multiple Files” function in FS-UAE Launcher, and select all the files you want to use with a game (Disk 1, Disk 2, etc). The floppies will be automatically added to the floppy swap list and also inserted into multiple floppy drives. While playing, you swap disks from the F12 menu (but only among the files you initially selected). See http://fengestad.no/fs-uae/floppy-images for more information.

  7. Lots of flight sims use the Amiga keypad keys to perform some functions and I am trying to create some custom mappings. I am using a Mac keyboard which doesn’t have a numeric keypad. How to a create a custom mapping that maps to the Amiga A500’s keypad keys? Thanks.

  8. Thx for great FS-UAE πŸ˜‰
    I tried to remap Amiga keys to Command keys on MacOSX using:
    keyboard_key_lmeta = action_key_amiga_left
    keyboard_key_rmeta = action_key_amiga_right
    but it doesn’t work, I can reboot using Ctrl-Command-Command but not using other combinations e.g. Amiga-I to open the icon info on the wb. PageDown-I works.

    • Hi, it should (ideally) work out of the box, and it does work here. The alt keys are mapped against the left and right alt keys, and the Cmd keys are mapped to left and right Amiga keys. The PageDown key is also mapped to the right Amiga key. Since you can reboot with Ctrl+Cmd+Cmd, one would think they work. Can the keys have been swapped? Can you try with the other Cmd/Amiga key?

      (lmeta and rmeta names are not actually used in FS-UAE, lsuper/rsuper are used for both and Cmd and Windows on all platforms. I have removed lmeta/rmeta from the documentation page).

      • It’s the same with the other Cmd. Also tried:
        keyboard_key_lsuper = action_key_amiga_left
        keyboard_key_rsuper = action_key_amiga_right
        but it makes no difference. I have a iMac with 10.7.5 and a Logitec S530 keyboard. PageUp works for now πŸ™‚

  9. Hi FS, in your example you have:
    joystick_0_left_shoulder = amiga_key_shift_left
    should this not be….
    joystick_0_left_shoulder = *action*_key_shift_left ?

    Also… you write:
    joystick_0_dpad_lstick_up = ….
    this does not work, but the followin does…
    joystick_0_lstick_up = ….

    Hope this helps πŸ™‚ Thanks!

Leave a Reply

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