Best Gamepad Mapping Apps for Linux

29/12/2020
Chưa phân loại
If you like to play games on Linux with a gamepad instead of a typical keyboard and mouse input system, there are some useful apps for you. Many PC games come without controller support out of the box, mainly because of the nature and the genre of the game. For instance, strategy games require you to micro manage resources and often contain a lot of UI elements and tooltips. Controller support in such cases is the last thing developers would like to add. However, even though the game may not support gamepads, it is possible to add controller support unofficially. This article will list some apps that allow you to remap key bindings to a game controller as well as remap existing gamepad mappings.

QJoyPad

QJoyPad is a free and open source graphical application that allows you to map keyboard and mouse events to a game controller. In simple terms, a Linux game that doesn’t support any or your particular game controller can be made to work with a gamepad using QJoyPad.

Some of the main features of QJoyPad are:

  • Multiple profiles making it easier to manage and switch mappings
  • “Turbo” or “Rapid Fire” button mode
  • Sticky mode for simulating “Press and Hold” behavior
  • Automatically detects gamepad buttons and axes
  • Supports controlling mouse via joysticks
  • Comes with full command line support for those who prefer CLI
  • Support for setting sensitivity of joysticks
  • Comes with many predefined algorithms for controlling mouse cursor sensitivity and acceleration
  • Quick set mode that allows you to detect and set individual keys at the same time

To install QJoyPad in Ubuntu, run the following command:

$ sudo apt install qjoypad

Run command below to launch QJoyPad (or use application launcher):

$ qjoypad

QJoyPad starts minimized to system tray, so you may not see any GUI window until you click on its panel applet. On some desktop environments, system tray is shown but nothing happens when you click on its menu items. To fix this issue, you have to run QJoyPad in non-system-tray mode by running command below:

$ qjoypad –notray

Running QJoyPad without system tray will create a small window containing nothing but icon of the app. If you right click on this icon, all the menu options that are available in the system tray will become visible.

Note that some of the QJoyPad options may not work unless you connect a game controller. To see the gamepad mapping window, double click on the icon shown in the screenshot above.

For QJoyPad mappings to work in a game or app, you will have to keep it running. Be careful not to accidentally close the small window with gamepad icon.

SDL2 Gamepad Tool

SDL2 Gamepad Tool is a free and open source app that allows you to configure game controller buttons using an easy to use graphical interface. As the name suggests, it only works for games that use SDL2 API for controller support (most native Linux games).

Using gamepad mapping database available here, it automatically configures mapping for most controllers. However if your game controller mappings are not shown in the app, you can create new mappings for it by clicking on “Create a New Mapping” button. You can also change pre-defined mappings for any controller using the same process.

Note that this app is not a keyboard-to-joypad mapping utility. It just creates SDL compatible mappings for gamepads so that games using SDL API can automatically pick them.

You can download SDL2 gamepad tool from here.

Once you are satisfied with the mappings, there are two methods you can use to enable them for games. Click on “Set Mapping as Environment Variable” to set these mappings system wide for all games.

The other method is to use these mappings on per game basis. Click on “Copy Mapping String” button then run a command in the following format:

$ SDL_GAMECONTROLLERCONFIG=”paste_here_string_copied_from_method_explained_above”
 /path/to/the/game/executable

For example, the mapping command on my system looks like this:

$ SDL_GAMECONTROLLERCONFIG="050000004c050000cc09000000810000,PS4
Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,
guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,
rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,"
/path/to/the/game/executable

SC Controller

SC Controller is a GTK3 application that allows you to create button mappings for Steam Controller, DualShock 4 gamepad, Xbox controller, and other similar gamepads. The main highlight of this app is its ability to configure advanced gamepad mappings that are equivalent to Steam client’s built-in configuration tool. In simple terms, SC Controller’s user mode driver / GUI app enables configuring gamepads without having a need to install Steam client (no need to have a Steam account as well). Just like QjoyPad, this app allows you to map keyboard and mouse events to a game controller.

Other useful features of SC Controller:

  • Gyroscope configuration support
  • Rapid fire or turbo mode functionality
  • Supports multiple gamepad profiles
  • Vibration / Rumble support
  • Macros and controller emulation
  • Supports on screen keyboard

SC Controller AppImage for Linux distributions can be downloaded from here. Mark the file executable and run it in a terminal or double click the file to start customizing gamepad mappings.

Note that for some reason, SC Controller fails to detect my DualShock 4 controller unless I run it with root access. Most probably because it fails to read input events from the gamepad. A custom udev rule can possibly fix this issue but explaining it here is beyond the scope of this article. If you are having gamepad detection problems with this app, try running it as root.

Conclusion

These are a few apps that can be used to create mappings for your game controller. Most of the well-known game controller brands work out of the box on Linux these days. However unlike console games, PC games rarely provide an option to remap gamepads. The apps mentioned above are especially useful when you are using a generic controller, when you want to alter the layout of existing button mappings, or when you want to map keyboard and mouse events to a game controller.

ONET IDC thành lập vào năm 2012, là công ty chuyên nghiệp tại Việt Nam trong lĩnh vực cung cấp dịch vụ Hosting, VPS, máy chủ vật lý, dịch vụ Firewall Anti DDoS, SSL… Với 10 năm xây dựng và phát triển, ứng dụng nhiều công nghệ hiện đại, ONET IDC đã giúp hàng ngàn khách hàng tin tưởng lựa chọn, mang lại sự ổn định tuyệt đối cho website của khách hàng để thúc đẩy việc kinh doanh đạt được hiệu quả và thành công.
Bài viết liên quan

Làm việc với lệnh Find và Locate

1. Lệnh Find find đường_dẫn -name kí_tự_cần_tìm Lệnh này sẽ cung cấp cho bạn một danh...
30/12/2020

Best GIF Maker Apps for Linux

GIF animations are a popular way to share fun animations, jokes and short clips of just about anything and it is hard to...
29/12/2020

How to Install and Use Anbox Android Emulator on Ubuntu

Anbox is a special type of android emulator. Technically, you can’t call it an emulator. Because, Anbox uses containerization...
29/12/2020
Bài Viết

Bài Viết Mới Cập Nhật

Mua Proxy V6 Nuôi Facebook Spam Hiệu Quả Tại Onetcomvn
03/06/2024

Hướng dẫn cách sử dụng ProxyDroid để duyệt web ẩn danh
03/06/2024

Mua proxy Onet uy tín tại Onet.com.vn
03/06/2024

Thuê mua IPv4 giá rẻ, tốc độ nhanh, uy tín #1
28/05/2024

Thuê địa chỉ IPv4 IPv6 trọn gói ở đâu chất lượng, giá RẺ nhất?
27/05/2024