ducky-one-two-mini-customized.png

Using the Ducky One 2 Mini with Vim

3 years ago 2720 views
2 min read

I recently bought the Ducky one 2 mini and got constantly confused due to the arrow key setup. Due to the keyboard being 60% they've moved the arrow keys to I,J,K,L which seems logical, however if your using Vim this gets confusing as you are using H,J,K,L as arrow keys. The Up arrow key is K in Vim but the K key is also representing the down arrow key when paired with FN. Look at the below picture for the standard Ducky One 2 Mini setup, specifically the blue rectangle with the I,J,K,L keys.

Ducky One 2 Mini

I find this too confusing and visually disturbing, luckily the Ducky One 2 Mini comes with extra keys - four of these are the arrow keys. So you can swap the H,J,K,L Keys with the arrow keys and remap the keys for the proper Vim functionality. FN + H,J,K,L becomes the arrow keys. Specifically for the Ducky One 2 Mini you can use the following commands in e.g your i3/window manager config startup:

exec --no-startup-id xmodmap -e "keycode 116 = Up"
exec --no-startup-id xmodmap -e "keycode 113 = Down"
exec --no-startup-id xmodmap -e "keycode 78 = Left"
exec --no-startup-id xmodmap -e "keycode 111 = Scroll_Lock"

Now your keyboard should be looking like the one below, take note of the updated arrow keys matching the default movement keys for Vim.

Ducky One 2 Mini Vim

The only caveat now is that the up arrow key is visually presented below the I key which should instead be the scroll lock key. However, this is much better for me at the least!