Vim pedal is a USB HID device for more comfortable text editing for Vim users.
When the pedal is pressed down, the pedal sends i [1] causing Vim to go into
"Insert Mode". When released, it types Esc and you are back in "Normal Mode".
It is equivalent to a standard HID USB keyboard and mouse, but it is customizable by using the setting software (we don't use it), which can define your foot switch as any keys, key combinations or mouse. No other software is required.
PCsensor also has a triple and mechanical versions of the footswitch.

DF Robot Beetle or Jtron Beetle is a clone of Arduino Leonardo on microboard.
The Arduino Leonardo is a microcontroller board based on the ATmega32u4. The Leonardo differs from all preceding boards in that the ATmega32u4 has built-in USB communication, eliminating the need for a secondary processor. This allows the Leonardo to appear to a connected computer as a mouse and keyboard, in addition to a virtual (CDC) serial / COM port.

USB footswitch is a standard USB HID device, equivalent to a generic PC-keyboard with one key. One pedal — one key. It's not enough for implementation of switch of Normal/Insert Vim mode.
I decided to use Arduino-compatible microcontoller with custom firmware for replacing PCsensor's pedal controller. Actually I decide to use PCsensor's optical sensor that switches when pedal pressed/released.
In this way I combined Beetle with optical sensor to reach my goals.
My solution differs from the project of Aleksandr Levchuk, because he used two PCsensor pedals and two USB ports!
Also my solution has additional features. Users can change the device's workflow logic on fly, add new input methods and use unlimited and flexible capabilities of Arduino microcontrollers. So, you can use Vim pedal as a PC mouse!
And finally Vim pedal has a killer feature — Arduino's blinking LED! [2]
First prototype. Optical sensor from PCsensor board connected to Beetle board.

Assembled inside pedal case with micro-USB connector.

Insulated with electrical tape.

Done!

Inspired by Aleksandr Levchuk's vim-clutch.
[1] When Vim in "Insert mode" and pedal is pressed down, you can get an
undesirable symbols i in your text. To avoid this I decided to send Esc + i
when pedal pressed down for exiting from "Insert mode" if this mode has already
been enabled.
[2] Beetle has a LED onboard, but not using in my application.
The Vim pedal work by Aleksey Kurepin is licensed under a Creative
Commons Attribution-ShareAlike 3.0 Unported License.
1 commits
Arduino
100.0%
Vim pedal is a USB HID device for more comfortable text editing for Vim users.
When the pedal is pressed down, the pedal sends i [1] causing Vim to go into
"Insert Mode". When released, it types Esc and you are back in "Normal Mode".
It is equivalent to a standard HID USB keyboard and mouse, but it is customizable by using the setting software (we don't use it), which can define your foot switch as any keys, key combinations or mouse. No other software is required.
PCsensor also has a triple and mechanical versions of the footswitch.

DF Robot Beetle or Jtron Beetle is a clone of Arduino Leonardo on microboard.
The Arduino Leonardo is a microcontroller board based on the ATmega32u4. The Leonardo differs from all preceding boards in that the ATmega32u4 has built-in USB communication, eliminating the need for a secondary processor. This allows the Leonardo to appear to a connected computer as a mouse and keyboard, in addition to a virtual (CDC) serial / COM port.

USB footswitch is a standard USB HID device, equivalent to a generic PC-keyboard with one key. One pedal — one key. It's not enough for implementation of switch of Normal/Insert Vim mode.
I decided to use Arduino-compatible microcontoller with custom firmware for replacing PCsensor's pedal controller. Actually I decide to use PCsensor's optical sensor that switches when pedal pressed/released.
In this way I combined Beetle with optical sensor to reach my goals.
My solution differs from the project of Aleksandr Levchuk, because he used two PCsensor pedals and two USB ports!
Also my solution has additional features. Users can change the device's workflow logic on fly, add new input methods and use unlimited and flexible capabilities of Arduino microcontrollers. So, you can use Vim pedal as a PC mouse!
And finally Vim pedal has a killer feature — Arduino's blinking LED! [2]
First prototype. Optical sensor from PCsensor board connected to Beetle board.

Assembled inside pedal case with micro-USB connector.

Insulated with electrical tape.

Done!

Inspired by Aleksandr Levchuk's vim-clutch.
[1] When Vim in "Insert mode" and pedal is pressed down, you can get an
undesirable symbols i in your text. To avoid this I decided to send Esc + i
when pedal pressed down for exiting from "Insert mode" if this mode has already
been enabled.
[2] Beetle has a LED onboard, but not using in my application.
The Vim pedal work by Aleksey Kurepin is licensed under a Creative
Commons Attribution-ShareAlike 3.0 Unported License.
1 commits
Arduino
100.0%