Introduction: USB IR Remote Control for Your Desktop / Laptop

Picture of USB IR Remote Control for Your  Desktop / Laptop

 USB IR Remote Control For your  Desktop / Laptop computer
 control your computer media player software  using  IR remote control.
  •  customizable and easy  program design
  •  minimal components
  •  multiple remote decoding support
  •  USB operation [ No need for serial port ]  suitable  for laptop.

Step 1: Arduino Leonardo

Picture of Arduino Leonardo


The Arduino Leonardo is a microcontroller board based on the ATmega32u4 (datasheet). It has 20 digital input/output pins (of which 7 can be used as PWM outputs and 12 as analog inputs), a 16 MHz
crystal oscillator, a micro USB connection, a power jack, an ICSP header, and a reset button. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to get started. 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.


MicrocontrollerATmega32u4 Operating Voltage5V Input Voltage (recommended)7-12V Input Voltage (limits)6-20V Digital I/O Pins20 PWM Channels7 Analog Input Channels12 DC Current per I/O Pin40 mA DC Current for 3.3V Pin50 mA Flash Memory32 KB (ATmega32u4) of which 4 KB used by bootloader SRAM2.5 KB (ATmega32u4) EEPROM1 KB (ATmega32u4) Clock Speed16 MHz

Download the Arduino Software

usb driver installation steps

Step 2: Arduino Remote Control Library

Picture of Arduino Remote Control Library

arduino tsop receiver library   
Infrared remote library for Arduino: send and receive infrared signals with multiple protocols

Download: Arduino IRremote Library

Step 3: VLC Hotkeys Table

Picture of VLC Hotkeys Table
  • Fullscreen key-toggle-fullscreen f
  • Leave fullscreen key-leave-fullscreen Esc
  • Play/Pause key-play-pause Space
  • Pause only key-pause [
  • Play only key-play ]
  • Faster key-faster +
  • Slower key-slower -
  • Normal rate key-rate-normal =
  • Faster (fine) key-rate-faster-fine Unset
  • Slower (fine) key-rate-slower-fine Unset
  • Next key-next n
  • Previous key-prev p
  • Stop key-stop s
  • Position key-position t
  • Very short backwards jump key-jump-extrashort Shift-Left
  • Very short forward jump key-jump+extrashort Shift-Right
  • Short backwards jump key-jump-short Alt-Left
  • Short forward jump key-jump+short Alt-Right
  • Medium backwards jump key-jump-medium Ctrl-LeftM
  • Medium forward jump key-jump+medium Ctrl-Right
  • Long backwards jump key-jump-long Alt-Ctrl-Left
  • Long forward jump key-jump+long Alt-Ctrl-Right
  • Next frame key-frame-next e
  • Activate key-nav-activate Enter
  • Navigate up key-nav-up Up
  • Navigate down key-nav-down Down
  • Navigate left key-nav-left Left
  • Navigate right key-nav-right Right
  • Go to the DVD menu key-disc-menu Shift-m
  • Select previous DVD title key-title-prev Shift-o
  • Select next DVD title key-title-next Shift-b
  • Select prev DVD chapter key-chapter-prev Shift-p
  • Select next DVD chapter key-chapter-next Shift-n
  • Quit key-quit Ctrl-q
  • Volume up key-vol-up Ctrl-Up
  • Volume down key-vol-down Ctrl-Down
  • Mute key-vol-mute m
  • Subtitle delay up key-subdelay-up h
  • Subtitle delay down key-subdelay-down g
  • Audio delay up key-audiodelay-up k
  • Audio delay down key-audiodelay-down j
  • Cycle audio track key-audio-track b
  • Cycle through audio devices key-audiodevice-cycle Shift-a
  • Cycle subtitle track key-subtitle-track v
  • Cycle source aspect ratio key-aspect-ratio a
  • Cycle video crop key-crop c
  • Toggle autoscaling key-toggle-autoscale o
  • Increase scale factor key-incr-scalefactor Alt-o
  • Decrease scale factor key-decr-scalefactor Alt-Shift-o
  • Cycle deinterlace modes key-deinterlace d
  • Show interface key-intf-show i
  • Hide interface key-intf-hide Shift-i
  • Take video snapshot key-snapshot Shift-s
  • Go back in browsing history key-history-back Shift-g
  • Go forward in browsing history key-history-forward Shift-h
  • Record key-record Shift-r
  • Dump key-dump Shift-d
  • Zoom key-zoom z
  • Un-Zoom key-unzoom Shift-z
  • Toggle wallpaper mode key-wallpaper w
  • Display OSD menu on top key-menu-on Alt-Shift-m
  • Do not display OSD menu key-menu-off Alt-Ctrl-m
  • Highlight widget on the right key-menu-right Alt-Shift-Right
  • Highlight widget on the left key-menu-left Alt-Shift-Left
  • Highlight widget on top key-menu-up Alt-Shift-Up
  • Highlight widget below key-menu-down Alt-Shift-Down
  • Select current widget key-menu-select Alt-Shift-Enter
  • Crop one pixel from the top key-crop-top Alt-r
  • Uncrop one pixel from the top key-uncrop-top Alt-Shift-r
  • Crop one pixel from the left key-crop-left Alt-d
  • Uncrop one pixel from the left key-uncrop-left Alt-Shift-d
  • Crop one pixel from the bottom key-crop-bottom Alt-c
  • Uncrop one pixel from the bottom key-uncrop-bottom Alt-Shift-c
  • Crop one pixel from the right key-crop-right Alt-f
  • Uncrop one pixel from the right key-uncrop-right Alt-Shift-f
  • Random key-random r
  • Normal/Repeat/Loop key-loop l
  • 1:4 Quarter key-zoom-quarter Ctrl-1
  • 1:2 Half key-zoom-half Ctrl-2
  • 1:1 Original key-zoom-original Ctrl-3
  • 2:1 Double key-zoom-double Ctrl-4
  • Very short jump length (integer) extrashort-jump-size 3
  • Set playlist bookmark 1 key-set-bookmark1 Ctrl-F1
  • Set playlist bookmark 2 key-set-bookmark2 Ctrl-F2
  • Set playlist bookmark 3 key-set-bookmark3 Ctrl-F3
  • Set playlist bookmark 4 key-set-bookmark4 Ctrl-F4
  • Set playlist bookmark 5 key-set-bookmark5 Ctrl-F5
  • Set playlist bookmark 6 key-set-bookmark6 Ctrl-F6
  • Set playlist bookmark 7 key-set-bookmark7 Ctrl-F7
  • Set playlist bookmark 8 key-set-bookmark8 Ctrl-F8
  • Set playlist bookmark 9 key-set-bookmark9 Ctrl-F9
  • Set playlist bookmark 10 key-set-bookmark10 Ctrl-F10
  • Play playlist bookmark 1 key-play-bookmark1 F1
  • Play playlist bookmark 2 key-play-bookmark2 F2
  • Play playlist bookmark 3 key-play-bookmark3 F3
  • Play playlist bookmark 4 key-play-bookmark4 F4
  • Play playlist bookmark 5 key-play-bookmark5 F5
  • Play playlist bookmark 6 key-play-bookmark6 F6
  • Play playlist bookmark 7 key-play-bookmark7 F7
  • Play playlist bookmark 8 key-play-bookmark8 F8
  • Play playlist bookmark 9 key-play-bookmark9 F9
  • Play playlist bookmark 10 key-play-bookmark10 F10

Step 4: How to Find the Remote Code

Picture of How to Find the Remote Code

1, load this program file  in to your arduino leonardo board
2, follow the  wiring diagram
3, open arduino IDE -> serial monitor
4, test your remote 

Step 5: Arduino Program - Add Remote Codes

/////////////////////////////////     USER IR REMOTE CODE  [SONY LCD TV REMOTE ]    ///////////////////////

#define PLAY                  0X2CE9
#define PAUSE                0X4CE9
//#define PLAY_PAUSE   0X0A70  
#define VLC_ON             0X0A70
#define NEXT                  0X5EE9
#define PRVS                 0X1EE9
#define STOP                  0X0CE9
#define MUTE                  0X0290
#define VOLUME_UP      0X0490
#define VOLUME_DN      0X0C90
#define JFWD                  0X1CE9
#define JBWD                 0X6CE9
#define EXIT                    0X0A90

Step 6: Arduino Program - Add Hot Keys

  single key press  

eg: Keyboard.write('s');              //key s for stop in vlc player;
 modifier keys,cursor movement key     

, );;

Keyboard.releaseAll();   release the modifier keys function

///////////////////////////  MEDIA PLAYER HOT KEYS   /////////////////////////////////

#define PLAY_FUN                      Keyboard.write(']');

#define PAUSE_FUN                    Keyboard.write('[');

//#define PLAY_PAUSE_FUN       Keyboard.write(' ');

#define VLC_ON_FUN       ;;
                                                     Keyboard.write('v'); delay(100);  Keyboard.releaseAll();    //VLC shortcut  [ alt+ctrl+v ]

#define NEXT_FUN                      Keyboard.write('n');

#define PRVS_FUN                     Keyboard.write('p');

#define STOP_FUN                     Keyboard.write('s');

#define MUTE_FUN                     Keyboard.write('m');

#define VOLUME_UP_FUN;; 
                                                     delay(100);  Keyboard.releaseAll();   

#define VOLUME_DN_FUN;; 
                                                    delay(100);  Keyboard.releaseAll(); 

#define JBWD_FUN           );; 
                                                    delay(100);  Keyboard.releaseAll();

#define JFWD_FUN             );;
                                                     delay(100);  Keyboard.releaseAll();

#define EXIT_FUN             ;   Keyboard.write('q');            
                                                   delay(100);  Keyboard.releaseAll();

Step 7: Arduino Program - Add a New Function

#define   <KEY name>       <remote code >

eg:  #define   NEW_HOTKEY       0x70

#define   <hot_macro>            <single key /key combination>

eg: #define  STOP_FUN             Keyboard.write('s');   //write s for stop

add if else ladder

else if (results.value==<KEY name>)        {hot_macro }

eg: else if (results.value==EXIT)        {EXIT_FUN;      }

compile and upload your code.

Step 8: Arduino Program

Picture of Arduino Program

install IR library

step 1: download  library

step 2: copy to arduino installed folder
                                                               eg:    [ C:\Program Files\Arduino\libraries ]  

step 3: restart  arduino IDE 


Step 9: Arduino Keyboard and Mouse Library Functions

Picture of Arduino Keyboard and Mouse Library Functions

Step 10: Wiring Diagram

Picture of Wiring Diagram

Step 11: Video

Picture of Video

Step 12: Reference

Picture of Reference


achakravarthi (author)2014-09-08

can u please provide links to download arduino keyboard is not give in the below link which u made as reference(

About This Instructable




Bio: embedded system enthusiast ...
More by Jestin_Cubetech:Wireless Robo-car  using  360°  servo motorRaspberry Pi - Revision 2  DIY Add-On Boardwater tank automation - prototype
Add instructable to: