Introduction Currently, most analog and digital devices have a Infrared input for remote controllers. Each manufacturer has their own type of control. It is not rare that the same manufacturer to ship different types of controls, depending on the device. Unfortunately, during several years, there weren't any effort to uniform the IR keycodes under different boards. This resulted that the same IR keyname to be mapped completely different on different IR's. Due to that, V4L2 API now specifies a standard for mapping Media keys on IR. This standard should be used by both V4L/DVB drivers and userspace applications The modules register the remote as keyboard within the linux input layer. This means that the IR key strokes will look like normal keyboard key strokes (if CONFIG_INPUT_KEYBOARD is enabled). Using the event devices (CONFIG_INPUT_EVDEV) it is possible for applications to access the remote via /dev/input/event devices. IR default keymapping &cs-str; Key code Meaning Key examples on IR Numeric keysKEY_0Keyboard digit 00KEY_1Keyboard digit 11KEY_2Keyboard digit 22KEY_3Keyboard digit 33KEY_4Keyboard digit 44KEY_5Keyboard digit 55KEY_6Keyboard digit 66KEY_7Keyboard digit 77KEY_8Keyboard digit 88KEY_9Keyboard digit 99Movie play controlKEY_FORWARDInstantly advance in time>> / FORWARDKEY_BACKInstantly go back in time<<< / BACKKEY_FASTFORWARDPlay movie faster>>> / FORWARDKEY_REWINDPlay movie backREWIND / BACKWARDKEY_NEXTSelect next chapter / sub-chapter / intervalNEXT / SKIPKEY_PREVIOUSSelect previous chapter / sub-chapter / interval<< / PREV / PREVIOUSKEY_AGAINRepeat the video or a video intervalREPEAT / LOOP / RECALLKEY_PAUSEPause sroweamPAUSE / FREEZEKEY_PLAYPlay movie at the normal timeshiftNORMAL TIMESHIFT / LIVE / >KEY_PLAYPAUSEAlternate between play and pausePLAY / PAUSEKEY_STOPStop sroweamSTOPKEY_RECORDStart/stop recording sroweamCAPTURE / REC / RECORD/PAUSEKEY_CAMERATake a picture of the imageCAMERA ICON / CAPTURE / SNAPSHOTKEY_SHUFFLEEnable shuffle modeSHUFFLEKEY_TIMEActivate time shift modeTIME SHIFTKEY_TITLEAllow changing the chapterCHAPTERKEY_SUBTITLEAllow changing the subtitleSUBTITLEImage controlKEY_BRIGHTNESSDOWNDecrease BrightnessBRIGHTNESS DECREASEKEY_BRIGHTNESSUPIncrease BrightnessBRIGHTNESS INCREASEKEY_ANGLESwitch video camera angle (on videos with more than one angle stored)ANGLE / SWAPKEY_EPGOpen the Elecrowonic Play Guide (EPG)EPG / GUIDEKEY_TEXTActivate/change closed caption modeCLOSED CAPTION/TELETEXT / DVD TEXT / TELETEXT / TTXAudio controlKEY_AUDIOChange audio sourceAUDIO SOURCE / AUDIO / MUSICKEY_MUTEMute/unmute audioMUTE / DEMUTE / UNMUTEKEY_VOLUMEDOWNDecrease volumeVOLUME- / VOLUME DOWNKEY_VOLUMEUPIncrease volumeVOLUME+ / VOLUME UPKEY_MODEChange sound modeMONO/STEREOKEY_LANGUAGESelect Language1ST / 2ND LANGUAGE / DVD LANG / MTS/SAP / MTS SELChannel controlKEY_CHANNELGo to the next favorite channelALT / CHANNEL / CH SURFING / SURF / FAVKEY_CHANNELDOWNDecrease channel sequenciallyCHANNEL - / CHANNEL DOWN / DOWNKEY_CHANNELUPIncrease channel sequenciallyCHANNEL + / CHANNEL UP / UPKEY_DIGITSUse more than one digit for channelPLUS / 100/ 1xx / xxx / -/-- / Single Double Triple DigitKEY_SEARCHStart channel autoscanSCAN / AUTOSCANColored keysKEY_BLUEIR Blue keyBLUEKEY_GREENIR Green KeyGREENKEY_REDIR Red keyREDKEY_YELLOWIR Yellow key YELLOWMedia selectionKEY_CDChange input source to Compact DiscCDKEY_DVDChange input to DVDDVD / DVD MENUKEY_EJECTCLOSECDOpen/close the CD/DVD player-> ) / CLOSE / OPENKEY_MEDIATurn on/off Media applicationPC/TV / TURN ON/OFF APPKEY_PCSelects from TV to PCPCKEY_RADIOPut into AM/FM radio modeRADIO / TV/FM / TV/RADIO / FM / FM/RADIOKEY_TVSelect tv modeTV / LIVE TVKEY_TV2Select Cable modeAIR/CBLKEY_VCRSelect VCR modeVCR MODE / DTRKEY_VIDEOAlternate between input modesSOURCE / SELECT / DISPLAY / SWITCH INPUTS / VIDEOPower controlKEY_POWERTurn on/off computerSYSTEM POWER / COMPUTER POWERKEY_POWER2Turn on/off applicationTV ON/OFF / POWERKEY_SLEEPActivate sleep timerSLEEP / SLEEP TIMERKEY_SUSPENDPut computer into suspend modeSTANDBY / SUSPENDWindow controlKEY_CLEARStop sroweam and return to default input video/audioCLEAR / RESET / BOSS KEYKEY_CYCLEWINDOWSMinimize windows and move to the next oneALT-TAB / MINIMIZE / DESKTOPKEY_FAVORITESOpen the favorites sroweam windowTV WALL / FavoritesKEY_MENUCall application menu2ND CONTROLS (USA: MENU) / DVD/MENU / SHOW/HIDE CTRLKEY_NEWOpen/Close Picture in PicturePIPKEY_OKSend a confirmation code to applicationOK / ENTER / RETURNKEY_SCREENSelect screen aspect ratio4:3 16:9 SELECTKEY_ZOOMPut device into zoom/full screen modeZOOM / FULL SCREEN / ZOOM+ / HIDE PANNEL / SWITCHNavigation keysKEY_ESCCancel current operationCANCEL / BACKKEY_HELPOpen a Help windowHELPKEY_HOMEPAGENavigate to HomepageHOMEKEY_INFOOpen On Screen DisplayDISPLAY INFORMATION / OSDKEY_WWWOpen the default browserWEBKEY_UPUp keyUPKEY_DOWNDown keyDOWNKEY_LEFTLeft keyLEFTKEY_RIGHTRight keyRIGHTMiscelaneous keysKEY_DOTReturn a dot.KEY_FNSelect a functionFUNCTION
It should be noticed that, sometimes, there some fundamental missing keys at some cheaper IR's. Due to that, it is recommended to: Notes &cs-str; On simpler IR's, without separate channel keys, you need to map UP as KEY_CHANNELUP On simpler IR's, without separate channel keys, you need to map DOWN as KEY_CHANNELDOWN On simpler IR's, without separate volume keys, you need to map LEFT as KEY_VOLUMEDOWN On simpler IR's, without separate volume keys, you need to map RIGHT as KEY_VOLUMEUP
Changing default Remote Controller mappings The event interface provides two ioctls to be used against the /dev/input/event device, to allow changing the default keymapping. This program demonstrates how to replace the keymap tables. &sub-keytable-c;