iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
⌨️

Operating Vim from a Left-Hand Device

に公開
2025/10/15

This article is the 391st installment of the Vim Ekiden.

There are left-handed devices that provide additional keys, wheels, and knobs that can be used separately from the keyboard keys. Left-handed devices are useful in situations where a keyboard is cumbersome or when you need extra keys, and they can certainly be used with Vim.

Of course, because using these devices requires moving your hand significantly from the home row, they are not particularly well-suited for Vim, but configuration is still possible. This article explains the setup procedure.

Setup Procedure

First, assign hotkeys to the keys on the left-handed device.
Not all left-handed devices do this, but keys typically do not send unique keycodes.
Therefore, you need to assign a hotkey to the key so that pressing it sends a specific key combination, such as Ctrl+F1 or Ctrl+Shift+F2.

For the hotkeys, since you want to define the corresponding operations in Vim, it is recommended to use hotkeys that do not conflict with any keys in the OS, terminal emulator, terminal multiplexer, or Vim, such as Ctrl+F1 or Ctrl+Shift+F2.
For example, on a device with three keys like the Wooting UwU, you would set hotkeys as follows:

Left-handed device key Hotkey
Key 1 Ctrl+Shift+F1
Key 2 Ctrl+Shift+F2
Key 3 Ctrl+Shift+F3

Then, set the corresponding operations in your vimrc.
For example, with the following configuration, the operation for each key on the left-handed device would be as follows:

~/.vimrc
" Perform save with key 1 (Ctrl+Shift+F1)
nnoremap <silent><C-S-F1> <Cmd>write<CR>
" Open a new tab with key 2 (Ctrl+Shift+F2)
nnoremap <silent><C-S-F2> <Cmd>tabnew<CR>
" Toggle between normal mode and insert mode with key 3 (Ctrl+Shift+F3)
nnoremap <silent><C-S-F3> i
inoremap <silent><C-S-F3> <ESC>
Left-handed device key Operation
Key 1 Save
Key 2 Open a new tab
Key 3 Enter insert mode if in normal mode, return to normal mode if in insert mode

That's all there is to the setup. Any operation can be assigned to the keys.

However, because using these keys requires moving your hand significantly from the home row, they are not suitable for frequently used operations.
If you do assign operations, it is recommended to assign those that are used infrequently but occasionally, and that feel unsuitable for any keyboard key.
First, consider assigning the operation to a keyboard key, and then think about the left-handed device afterward.

In my case, outside of Vim, I assign audio device switching to a key on my Stream Deck. This operation is used infrequently but occasionally, and since every keyboard key is already assigned some operation by some application, assigning it to any key would either cause a conflict or require multiple modifier keys, so I assign it to the Stream Deck.[1]

Setup Examples

Let's look at setup examples for several left-handed devices. The Vim-side settings are the same as in the setup procedure, and we'll show how to configure each device.

ACK05 Wireless Shortcut Remote

https://www.xp-pen.jp/product/ack05-wireless-shortcut-remote.html

For the ACK05 Wireless Shortcut Remote, connect it to your PC following the manual at the following URL, then download and install the configuration software from the following URL. There are multiple installers; just choose the latest version that matches your OS.

https://www.xp-pen.jp/user-manual/ack05-user-manual
https://www.xp-pen.jp/download-978.html

Once you have installed the configuration software Pentablet, launch it. A window like the following will appear.

First, create a profile to prevent key input outside of the terminal. Click the + in the top right of the window to open the profile addition dialog. If the terminal app is in the list, select it from there; otherwise, use 'Browse' to select the terminal application and create the profile.

Then, in the default profile, for each key, right-click the key to open the key settings dialog, and set it to Other → Disable.

If a new profile is created as shown and the keys are disabled in the default profile as shown, you won't have to worry about accidental inputs.[2]


Next, in the newly created profile, for the following keys, right-click the key to open the key settings dialog, and set the hotkey under Express Key → Keyboard Input as follows.

Left-handed device key Hotkey
K1 Ctrl+Shift+F1
K2 Ctrl+Shift+F2
K3 Ctrl+Shift+F3

If the hotkeys are set as shown, the ACK05 Wireless Shortcut Remote side is configured.

The ACK05 Wireless Shortcut Remote also allows you to assign operations to the wheel. If there are any operations you'd like to assign to the wheel, I recommend setting those as well.

Microsoft Number Pad

https://www.microsoft.com/ja-jp/d/microsoft-number-pad/8v4nh9q07xc8/DBJS?activetab=pivot:概要tab

Although it's more of a numeric keypad than a left-handed device, for the Microsoft Number Pad, connect it to your PC following the manual at the following URL, then download and install the configuration software installer from the following URL.

https://support.microsoft.com/ja-jp/topic/microsoft-テンキーを使用する-ddc5eb8b-1368-fadf-dc5d-92e0bde0a745
https://support.microsoft.com/ja-jp/topic/マウス-キーボード-センターのダウンロード-f5b10905-7887-eedb-2f1c-d0737a36a3b2

Once you have installed the configuration software Microsoft Mouse and Keyboard Center, launch it. A window like the following will appear.

For the following keys, left-click the key to open key settings, and under Show All Commands → Key Combination, set the hotkeys as follows.

Numpad key Hotkey
/ Ctrl+Shift+F1
* Ctrl+Shift+F2
- Ctrl+Shift+F3

If the hotkeys are set as shown, the Microsoft Number Pad side is configured.

Since the Microsoft Mouse and Keyboard Center does not have a profile feature, if the hotkeys conflict with other keys, I recommend using different hotkeys.

Stream Deck Pedal

https://www.elgato.com/jp/ja/p/stream-deck-pedal

Although it's more of a foot pedal than a left-handed device, for the Stream Deck Pedal, connect it to your PC following the quick start guide at the bottom of the linked page, then filter by system in the top right to select your OS, download the Stream Deck configuration software installer from the download section, and install it.[3]

https://www.elgato.com/jp/ja/p/stream-deck-pedal
https://www.elgato.com/jp/ja/s/downloads

Once you have installed the configuration software Stream Deck, launch it. A window like the following will appear.

First, create a profile to prevent key input outside of the terminal. Click the gear icon to open the Preferences window, open the Profiles tab, select Stream Deck Pedal, and create a new profile via + → Add New Profile.

Once you have created the profile, for the profile's application, either select the terminal app from the list if present, or select it via 'Other'.

Then, in the default profile, check 'Make this my default profile'.

If a new profile is created as shown and the default profile is set as the default profile as shown, you won't have to worry about accidental inputs.[4]


Next, in the newly created profile, for the following pedals, drag and drop System → Hotkey, and set the hotkeys as follows.

Foot pedal Hotkey
Left Ctrl+Shift+F1
Center Ctrl+Shift+F2
Right Ctrl+Shift+F3

If the hotkeys are set on the pedals as shown, the Stream Deck Pedal side is configured.

Since it's a foot pedal, your home row position won't be disrupted, but I imagine it will require some getting used to since you likely don't normally operate things with your feet. It feels like even if you grew a third or fourth arm, it would be hard to utilize them effectively... I found it confusing, so I haven't assigned anything to it currently.

Summary

This is how you can assign Vim operations to a left-handed device.

Since Vim relies on training your hands to remember operations, utilizing a left-handed device can be quite challenging, but there may be situations where it proves useful.

If you're curious, please give it a try.

脚注
  1. It's debatable whether the Stream Deck qualifies as a left-handed device, but... ↩︎

  2. This is not a required setting, so you can skip it. ↩︎

  3. As far as I've checked, the configuration software is only available for Windows and Mac; I couldn't find a version for Linux. ↩︎

  4. This is not a required setting, so you can skip it. ↩︎

Discussion