Glam Prestige Journal

Bright entertainment trends with youth appeal.

I ordered USB foot pedal/button. Currently it outputs the letter "B" when pressed. How to make it act as the key "Enter"?

3

1 Answer

You should follow this guide: (this is a transcription of this documentation).

  1. find out how the foot pedal is addressed by the operating system with lsusb, e.g. Bus 006 Device 004: ID 0c45:7403 Microdia
  2. get more details with lsusb -v -d 0c45:7403 | grep "idVendor|idProduct" where 0c45:7403 is the device ID that shows up in lsusb
  3. find how the USB foot pedal is addressed as an input device so that we can remap it: /lib/udev/findkeyboards (e.g. USB keyboard: input/event11)
  4. sudo /lib/udev/keymap -i input/event11 (If you accidentily choose your primary keyboard, press ESC to get back to the command prompt.)
  5. there you can see the scan code that is detected when the foot pedal is pressed, e.g. 0x70005
  6. edit (sudo) /lib/udev/rules.d/95-keymap.rules to append:ENV{ID_VENDOR}=="Microdia", ATTRS{idProduct}=="0x7403", RUN+="keymap $name microdia" LABEL="keyboard_end"Very important note here, the ID_VENDOR is set to our result from lsusb before while the idProduct matches the 0x7403 we got again from lsusb and it comes just before the line LABEL="keyboard_end".

  7. create a new keymap file at /lib/udev/keymaps/microdia (substituting your LABEL from before as the filename): 0x70005 F13 (Mapping the F13 to the pedal).

  8. run the command to get it up and running: sudo /lib/udev/keymap -i input/event11 /lib/udev/keymaps/microdia. Note that you will need to reboot your machine for the change to be permanent, but otherwise you should be good.

Hope it helps :)

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy