Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have problems changing my remotes keys. The rc has a joystick for controlling the mouse cursor. After connecting the rc to my computer everything works fine, but the shortcuts are made for Windows MCE and thus they don't fit for me.

I tried to solve my problem with LIRC. This works so far as fine, but I can't use my joystick with this configuration.

Now I don't have an idea how to activate this joystick again, because it worked without LIRC (rather than without irexec).

Does anybody have a hint for me how to activate the joystick or change the shortcuts in another way?

My RC is in /dev/input/event3 and /dev/input/mouse1 and respectively /dev/input/by-path/pci-0000:00:04.0-usb-0:3:1.0-event-mouse and /dev/input/by-path/pci-0000:00:04.0-usb-0:3:1.0-mouse.

Here are my configs:

/etc/lirc/hardware.conf

# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE="Linux input layer (/dev/input/eventX)"
REMOTE_MODULES=""
REMOTE_DRIVER="devinput"
REMOTE_DEVICE="/dev/input/by-path/pci-0000:00:04.0-usb-0:3:1.0-event-mouse"
REMOTE_SOCKET=""
REMOTE_LIRCD_CONF="devinput/lircd.conf.devinput"
REMOTE_LIRCD_ARGS=""

#Chosen IR Transmitter
TRANSMITTER="None"
TRANSMITTER_MODULES=""
TRANSMITTER_DRIVER=""
TRANSMITTER_DEVICE=""
TRANSMITTER_SOCKET=""
TRANSMITTER_LIRCD_CONF=""
TRANSMITTER_LIRCD_ARGS=""

#Enable lircd
START_LIRCD="true"

#Don't start lircmd even if there seems to be a good config file
START_LIRCMD="true"

#Try to load appropriate kernel modules
LOAD_MODULES="true"

# Default configuration files for your hardware if any
LIRCMD_CONF=""

#Forcing noninteractive reconfiguration
#If lirc is to be reconfigured by an external application
#that doesn't have a debconf frontend available, the noninteractive
#frontend can be invoked and set to parse REMOTE and TRANSMITTER
#It will then populate all other variables without any user input
#If you would like to configure lirc via standard methods, be sure
#to leave this set to "false"
FORCE_NONINTERACTIVE_RECONFIGURATION="false"
START_LIRCMD=""

/etc/lirc/hardware.conf

#This configuration has been automatically generated via
#the Ubuntu LIRC package maintainer scripts.
#
#It includes the default configuration for the remote and/or
#transmitter that you have selected during package installation.
#
#Feel free to add any custom remotes to the configuration
#via additional include directives or below the existing
#Ubuntu include directives from your selected remote and/or
#transmitter.

#Configuration for the Linux input layer (/dev/input/eventX) remote:
include "/usr/share/lirc/remotes/devinput/lircd.conf.devinput"

/usr/share/lirc/remotes/devinput/lircd.conf.devinput

# generated by devinput.sh
begin remote

  name  devinput
  bits           16
  eps            30
  aeps          100

  one             0     0
  zero            0     0
  pre_data_bits   16
  pre_data       0x8001
  gap          132799
  toggle_bit_mask 0x0

      begin codes
      KEY_0                    0x000B
      KEY_102ND                0x0056
      KEY_1                    0x0002
      KEY_2                    0x0003
      KEY_3                    0x0004
      KEY_4                    0x0005
      KEY_5                    0x0006
      KEY_6                    0x0007
      KEY_7                    0x0008
      KEY_8                    0x0009
      KEY_9                    0x000A
      KEY_A                    0x001E
      KEY_AB                   0x0196
      KEY_AGAIN                0x0081
      KEY_ALTERASE             0x00DE
      KEY_ANGLE                0x0173
      KEY_APOSTROPHE           0x0028
      KEY_ARCHIVE              0x0169
      KEY_AUDIO                0x0188
      KEY_AUX                  0x0186
      KEY_B                    0x0030
      KEY_BACK                 0x009E
      KEY_BACKSLASH            0x002B
      KEY_BACKSPACE            0x000E
      KEY_BASSBOOST            0x00D1
      KEY_BATTERY              0x00EC
      KEY_BLUE                 0x0191
      KEY_BOOKMARKS            0x009C
      KEY_BREAK                0x019B
      KEY_BRIGHTNESSDOWN       0x00E0
      KEY_BRIGHTNESSUP         0x00E1
      KEY_BRL_DOT1             0x01F1
      KEY_BRL_DOT2             0x01F2
      KEY_BRL_DOT3             0x01F3
      KEY_BRL_DOT4             0x01F4
      KEY_BRL_DOT5             0x01F5
      KEY_BRL_DOT6             0x01F6
      KEY_BRL_DOT7             0x01F7
      KEY_BRL_DOT8             0x01F8
      KEY_C                    0x002E
      KEY_CALC                 0x008C
      KEY_CALENDAR             0x018D
      KEY_CAMERA               0x00D4
      KEY_CANCEL               0x00DF
      KEY_CAPSLOCK             0x003A
      KEY_CD                   0x017F
      KEY_CHANNEL              0x016B
      KEY_CHANNELDOWN          0x0193
      KEY_CHANNELUP            0x0192
      KEY_CHAT                 0x00D8
      KEY_CLEAR                0x0163
      KEY_CLOSE                0x00CE
      KEY_CLOSECD              0x00A0
      KEY_COFFEE               0x0098
      KEY_COMMA                0x0033
      KEY_COMPOSE              0x007F
      KEY_COMPUTER             0x009D
      KEY_CONFIG               0x00AB
      KEY_CONNECT              0x00DA
      KEY_COPY                 0x0085
      KEY_CUT                  0x0089
      KEY_CYCLEWINDOWS         0x009A
      KEY_D                    0x0020
      KEY_DEL_EOL              0x01C0
      KEY_DEL_EOS              0x01C1
      KEY_DELETE               0x006F
      KEY_DELETEFILE           0x0092
      KEY_DEL_LINE             0x01C3
      KEY_DIGITS               0x019D
      KEY_DIRECTION            0x0099
      KEY_DIRECTORY            0x018A
      KEY_DOCUMENTS            0x00EB
      KEY_DOT                  0x0034
      KEY_DOWN                 0x006C
      KEY_DVD                  0x0185
      KEY_E                    0x0012
      KEY_EDIT                 0x00B0
      KEY_EJECTCD              0x00A1
      KEY_EJECTCLOSECD         0x00A2
      KEY_EMAIL                0x00D7
      KEY_END                  0x006B
      KEY_ENTER                0x001C
      KEY_EPG                  0x016D
      KEY_EQUAL                0x000D
      KEY_ESC                  0x0001
      KEY_EXIT                 0x00AE
      KEY_F10                  0x0044
      KEY_F11                  0x0057
      KEY_F12                  0x0058
      KEY_F13                  0x00B7
      KEY_F14                  0x00B8
      KEY_F15                  0x00B9
      KEY_F1                   0x003B
      KEY_F16                  0x00BA
      KEY_F17                  0x00BB
      KEY_F18                  0x00BC
      KEY_F19                  0x00BD
      KEY_F20                  0x00BE
      KEY_F21                  0x00BF
      KEY_F22                  0x00C0
      KEY_F23                  0x00C1
      KEY_F24                  0x00C2
      KEY_F2                   0x003C
      KEY_F                    0x0021
      KEY_F3                   0x003D
      KEY_F4                   0x003E
      KEY_F5                   0x003F
      KEY_F6                   0x0040
      KEY_F7                   0x0041
      KEY_F8                   0x0042
      KEY_F9                   0x0043
      KEY_FASTFORWARD          0x00D0
      KEY_FAVORITES            0x016C
      KEY_FILE                 0x0090
      KEY_FINANCE              0x00DB
      KEY_FIND                 0x0088
      KEY_FIRST                0x0194
      KEY_FN                   0x01D0
      KEY_FN_1                 0x01DE
      KEY_FN_2                 0x01DF
      KEY_FN_B                 0x01E4
      KEY_FN_D                 0x01E0
      KEY_FN_E                 0x01E1
      KEY_FN_ESC               0x01D1
      KEY_FN_F                 0x01E2
      KEY_FN_F10               0x01DB
      KEY_FN_F1                0x01D2
      KEY_FN_F11               0x01DC
      KEY_FN_F12               0x01DD
      KEY_FN_F2                0x01D3
      KEY_FN_F3                0x01D4
      KEY_FN_F4                0x01D5
      KEY_FN_F5                0x01D6
      KEY_FN_F6                0x01D7
      KEY_FN_F7                0x01D8
      KEY_FN_F8                0x01D9
      KEY_FN_F9                0x01DA
      KEY_FN_S                 0x01E3
      KEY_FORWARD              0x009F
      KEY_FORWARDMAIL          0x00E9
      KEY_FRONT                0x0084
      KEY_G                    0x0022
      KEY_GOTO                 0x0162
      KEY_GRAVE                0x0029
      KEY_GREEN                0x018F
      KEY_H                    0x0023
      KEY_HANGEUL              0x007A
      KEY_HANJA                0x007B
      KEY_HELP                 0x008A
      KEY_HENKAN               0x005C
      KEY_HIRAGANA             0x005B
      KEY_HOME                 0x0066
      KEY_HOMEPAGE             0x00AC
      KEY_HP                   0x00D3
      KEY_I                    0x0017
      KEY_INFO                 0x0166
      KEY_INSERT               0x006E
      KEY_INS_LINE             0x01C2
      KEY_ISO                  0x00AA
      KEY_J                    0x0024
      KEY_K                    0x0025
      KEY_KATAKANA             0x005A
      KEY_KATAKANAHIRAGANA     0x005D
      KEY_KBDILLUMDOWN         0x00E5
      KEY_KBDILLUMTOGGLE       0x00E4
      KEY_KBDILLUMUP           0x00E6
      KEY_KEYBOARD             0x0176
      KEY_KP0                  0x0052
      KEY_KP1                  0x004F
      KEY_KP2                  0x0050
      KEY_KP3                  0x0051
      KEY_KP4                  0x004B
      KEY_KP5                  0x004C
      KEY_KP6                  0x004D
      KEY_KP7                  0x0047
      KEY_KP8                  0x0048
      KEY_KP9                  0x0049
      KEY_KPASTERISK           0x0037
      KEY_KPCOMMA              0x0079
      KEY_KPDOT                0x0053
      KEY_KPENTER              0x0060
      KEY_KPEQUAL              0x0075
      KEY_KPJPCOMMA            0x005F
      KEY_KPLEFTPAREN          0x00B3
      KEY_KPMINUS              0x004A
      KEY_KPPLUS               0x004E
      KEY_KPPLUSMINUS          0x0076
      KEY_KPRIGHTPAREN         0x00B4
      KEY_KPSLASH              0x0062
      KEY_L                    0x0026
      KEY_LANGUAGE             0x0170
      KEY_LAST                 0x0195
      KEY_LEFT                 0x0069
      KEY_LEFTALT              0x0038
      KEY_LEFTBRACE            0x001A
      KEY_LEFTCTRL             0x001D
      KEY_LEFTMETA             0x007D
      KEY_LEFTSHIFT            0x002A
      KEY_LINEFEED             0x0065
      KEY_LIST                 0x018B
      KEY_M                    0x0032
      KEY_MACRO                0x0070
      KEY_MAIL                 0x009B
      KEY_MAX                  0x01FF
      KEY_MEDIA                0x00E2
      KEY_MEMO                 0x018C
      KEY_MENU                 0x008B
      KEY_MHP                  0x016F
      KEY_MINUS                0x000C
      KEY_MODE                 0x0175
      KEY_MOVE                 0x00AF
      KEY_MP3                  0x0187
      KEY_MSDOS                0x0097
      KEY_MUHENKAN             0x005E
      KEY_MUTE                 0x0071
      KEY_N                    0x0031
      KEY_NEW                  0x00B5
      KEY_NEXT                 0x0197
      KEY_NEXTSONG             0x00A3
      KEY_NUMLOCK              0x0045
      KEY_O                    0x0018
      KEY_OK                   0x0160
      KEY_OPEN                 0x0086
      KEY_OPTION               0x0165
      KEY_P                    0x0019
      KEY_PAGEDOWN             0x006D
      KEY_PAGEUP               0x0068
      KEY_PASTE                0x0087
      KEY_PAUSE                0x0077
      KEY_PAUSECD              0x00C9
      KEY_PC                   0x0178
      KEY_PHONE                0x00A9
      KEY_PLAY                 0x00CF
      KEY_PLAYCD               0x00C8
      KEY_PLAYER               0x0183
      KEY_PLAYPAUSE            0x00A4
      KEY_POWER                0x0074
      KEY_POWER2               0x0164
      KEY_PREVIOUS             0x019C
      KEY_PREVIOUSSONG         0x00A5
      KEY_PRINT                0x00D2
      KEY_PROG1                0x0094
      KEY_PROG2                0x0095
      KEY_PROG3                0x00CA
      KEY_PROG4                0x00CB
      KEY_PROGRAM              0x016A
      KEY_PROPS                0x0082
      KEY_PVR                  0x016E
      KEY_Q                    0x0010
      KEY_QUESTION             0x00D6
      KEY_R                    0x0013
      KEY_RADIO                0x0181
      KEY_RECORD               0x00A7
      KEY_RED                  0x018E
      KEY_REDO                 0x00B6
      KEY_REFRESH              0x00AD
      KEY_REPLY                0x00E8
      KEY_RESERVED             0x0000
      KEY_RESTART              0x0198
      KEY_REWIND               0x00A8
      KEY_RIGHT                0x006A
      KEY_RIGHTALT             0x0064
      KEY_RIGHTBRACE           0x001B
      KEY_RIGHTCTRL            0x0061
      KEY_RIGHTMETA            0x007E
      KEY_RIGHTSHIFT           0x0036
      KEY_RO                   0x0059
      KEY_S                    0x001F
      KEY_SAT                  0x017D
      KEY_SAT2                 0x017E
      KEY_SAVE                 0x00EA
      KEY_SCREEN               0x0177
      KEY_SCROLLDOWN           0x00B2
      KEY_SCROLLLOCK           0x0046
      KEY_SCROLLUP             0x00B1
      KEY_SEARCH               0x00D9
      KEY_SELECT               0x0161
      KEY_SEMICOLON            0x0027
      KEY_SEND                 0x00E7
      KEY_SENDFILE             0x0091
      KEY_SETUP                0x008D
      KEY_SHOP                 0x00DD
      KEY_SHUFFLE              0x019A
      KEY_SLASH                0x0035
      KEY_SLEEP                0x008E
      KEY_SLOW                 0x0199
      KEY_SOUND                0x00D5
      KEY_SPACE                0x0039
      KEY_SPORT                0x00DC
      KEY_STOP                 0x0080
      KEY_STOPCD               0x00A6
      KEY_SUBTITLE             0x0172
      KEY_SUSPEND              0x00CD
      KEY_SWITCHVIDEOMODE      0x00E3
      KEY_SYSRQ                0x0063
      KEY_T                    0x0014
      KEY_TAB                  0x000F
      KEY_TAPE                 0x0180
      KEY_TEEN                 0x019E
      KEY_TEXT                 0x0184
      KEY_TIME                 0x0167
      KEY_TITLE                0x0171
      KEY_TUNER                0x0182
      KEY_TV                   0x0179
      KEY_TV2                  0x017A
      KEY_TWEN                 0x019F
      KEY_U                    0x0016
      KEY_UNDO                 0x0083
      KEY_UNKNOWN              0x00F0
      KEY_UP                   0x0067
      KEY_V                    0x002F
      KEY_VCR                  0x017B
      KEY_VCR2                 0x017C
      KEY_VENDOR               0x0168
      KEY_VIDEO                0x0189
      KEY_VOLUMEDOWN           0x0072
      KEY_VOLUMEUP             0x0073
      KEY_W                    0x0011
      KEY_WAKEUP               0x008F
      KEY_WWW                  0x0096
      KEY_X                    0x002D
      KEY_XFER                 0x0093
      KEY_Y                    0x0015
      KEY_YELLOW               0x0190
      KEY_YEN                  0x007C
      KEY_Z                    0x002C
      KEY_ZENKAKUHANKAKU       0x0055
      KEY_ZOOM                 0x0174
      BTN_0                    0x0100
      BTN_1                    0x0101
      BTN_2                    0x0102
      BTN_3                    0x0103
      BTN_4                    0x0104
      BTN_5                    0x0105
      BTN_6                    0x0106
      BTN_7                    0x0107
      BTN_8                    0x0108
      BTN_9                    0x0109
      BTN_A                    0x0130
      BTN_B                    0x0131
      BTN_BACK                 0x0116
      BTN_BASE                 0x0126
      BTN_BASE2                0x0127
      BTN_BASE3                0x0128
      BTN_BASE4                0x0129
      BTN_BASE5                0x012A
      BTN_BASE6                0x012B
      BTN_C                    0x0132
      BTN_DEAD                 0x012F
      BTN_DIGI                 0x0140
      BTN_EXTRA                0x0114
      BTN_FORWARD              0x0115
      BTN_GAMEPAD              0x0130
      BTN_GEAR_DOWN            0x0150
      BTN_GEAR_UP              0x0151
      BTN_JOYSTICK             0x0120
      BTN_LEFT                 0x0110
      BTN_MIDDLE               0x0112
      BTN_MISC                 0x0100
      BTN_MODE                 0x013C
      BTN_MOUSE                0x0110
      BTN_PINKIE               0x0125

      BTN_RIGHT                0x0111
      BTN_SELECT               0x013A
      BTN_SIDE                 0x0113
      BTN_START                0x013B
      BTN_STYLUS               0x014B
      BTN_STYLUS2              0x014C
      BTN_TASK                 0x0117
      BTN_THUMB                0x0121
      BTN_THUMB2               0x0122
      BTN_THUMBL               0x013D
      BTN_THUMBR               0x013E
      BTN_TL                   0x0136
      BTN_TL2                  0x0138
      BTN_TOOL_AIRBRUSH        0x0144
      BTN_TOOL_BRUSH           0x0142
      BTN_TOOL_DOUBLETAP       0x014D
      BTN_TOOL_FINGER          0x0145
      BTN_TOOL_LENS            0x0147
      BTN_TOOL_MOUSE           0x0146
      BTN_TOOL_PEN             0x0140
      BTN_TOOL_PENCIL          0x0143
      BTN_TOOL_RUBBER          0x0141
      BTN_TOOL_TRIPLETAP       0x014E
      BTN_TOP                  0x0123
      BTN_TOP2                 0x0124
      BTN_TOUCH                0x014A
      BTN_TR                   0x0137
      BTN_TR2                  0x0139
      BTN_TRIGGER              0x0120
      BTN_WHEEL                0x0150
      BTN_X                    0x0133
      BTN_Y                    0x0134
      BTN_Z                    0x0135
      end codes

end remote

~/.lircrc

begin
    prog = irexec
    button = KEY_LEFTALT
    button = KEY_F4
    config = xte "keydown Alt_L" "keydown F4" "keyup F4" "keyup Alt_L"
end

#############
# Steuerung #
#############
begin
    prog = irexec
    button = KEY_LEFT
    config = xte "key Left"
end

begin
    prog = irexec
    button = KEY_UP
    config = xte "key Up"
end

begin
    prog = irexec
    button = KEY_DOWN
    config = xte "key Down"
end

begin
    prog = irexec
    button = KEY_RIGHT
    config = xte "key Right"
end

begin
    prog = irexec
    button = KEY_ENTER
    config = xte "key Return"
end

begin
    prog = irexec
    button = KEY_BACKSPACE
    config = xte "key Escape"
end

begin
    prog = irexec
    button = KEY_LEFTCTRL
    button = KEY_LEFTSHIFT
    button = KEY_M
    config = xte "key Tab"
end
###################
# Video-Steuerung #
###################
begin
    prog = irexec
    button = KEY_LEFTCTRL
    button = KEY_LEFTSHIFT
    button = KEY_P
    config = xte "key XF86AudioPlay"
end

begin
    prog = irexec
    button = KEY_LEFTCTRL
    button = KEY_P
    config = xte "key XF86AudioPause"
end

begin
    prog = irexec
    button = KEY_STOPCD
    config = xte "key XF86AudioStop"
end

begin
    prog = irexec
    button = KEY_LEFTCTRL
    button = KEY_B
    config = xte "key XF86AudioPrev"
end

begin
    prog = irexec
    button = KEY_LEFTCTRL
    button = KEY_F
    config = xte "key XF86AudioNext"
end

begin
    prog = irexec
    button = KEY_LEFTCTRL
    button = KEY_LEFTSHIFT
    button = KEY_B
    config = xte "key XF86Back"
end

begin
    prog = irexec
    button = KEY_LEFTCTRL
    button = KEY_LEFTSHIFT
    button = KEY_F
    config = xte "key XF86Forward"
end


##############
# Lautstärke #
##############
begin
    prog = irexec
    button = KEY_F9
    config = xte "key XF86AudioLowerVolume"
end

begin
    prog = irexec
    button = KEY_F10
    config = xte "key XF86AudioRaiseVolume"
end

begin
    prog = irexec
    button = KEY_F8
    config = xte "key XF86AudioMute"
end

##################
# Buttons Farbig #
##################
begin
    prog = irexec
    button = KEY_LEFTCTRL
    button = KEY_LEFTSHIFT
    button = KEY_T
    config = xte "keydown Control_L" "keydown Alt_L" "key D" "keyup Alt_L" "keyup Control_L"
end

begin
    prog = irexec
    button = KEY_LEFTCTRL
    button = KEY_E
#       config = /home/zwaen/rc/btn-green
end

begin
    prog = irexec
    button = KEY_LEFTCTRL
    button = KEY_I
#       config = /home/zwaen/rc/btn-yellow
end

begin
    prog = irexec
    button = KEY_LEFTCTRL
    button = KEY_M
#       config = /home/zwaen/rc/btn-blue
end

#############
# Buttons s #
#############
begin
    prog = irexec
    button = KEY_HOMEPAGE
#       config = /home/zwaen/rc/s1
end

begin
    prog = irexec
    button = KEY_BOOKMARKS
#       config = /home/zwaen/rc/s2
end

begin
    prog = irexec
    button = KEY_BACK
#       config = /home/zwaen/rc/s3
end

begin
    prog = irexec
    button = KEY_FORWARD
#       config = /home/zwaen/rc/s4
end
share|improve this question

1 Answer 1

OK so your lirc configuration basically claims the mouse as a remote control input which means xinput can't then use it as a normal mouse. Without lirc claiming the hardware xinput would pick up the mouse and you'd see it when running xinput list from the command line under Virtual core pointer

So since your configuration binds it up what you need to do is use the LIRCMD (Mouse daemon) which will create a fake mouse that xinput can see and will run the events to that fake mouse. See this website for further details: http://manpages.ubuntu.com/manpages/lucid/man8/lircmd.8.html

As you can see here running lircmd with the -uinput option should create a standard linux mouse event port which you should be able to configure in your lirc configuration. You might also be interested in this interesting thread: http://ubuntuforums.org/showthread.php?t=1539077

share|improve this answer
    
But I don't see any events on using the rc joystick, so I don't know how to configure the lircmd.conf file. –  Sven Walter Nov 12 '10 at 13:12
    
This is something you will have to ask the lircmd community about specifically if you don't know how to do it. There should however be examples online to follow. –  Martin Owens -doctormo- Nov 12 '10 at 15:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.