or Connect
AVS › AVS Forum › Video Components › Home Theater Computers › HTPC - Linux Chat › setting up IR remote for DVD playback
New Posts  All Forums:Forum Nav:

setting up IR remote for DVD playback - Page 2

post #31 of 60
It seems you need to try everything, and see if you get any positive results. So yes, go ahead and delete the pid file:
Code:
sudo rm /var/run/lrc/lircd.pid

You can also just try restarting lirc too:
Code:
sudo lirc restart

Edited by waterhead - 10/26/12 at 1:13pm
post #32 of 60
Thread Starter 
Well, I tried that and went back through all your suggestions in the thread, and I don't see any indications that anything has changed, either in terminal output or the remote's behavior. I think I'm in over my head on this one... Probably best to just buy a different remote (Newegg has the Rosewill 11002 on special for $13.99) that's less likely to have these "old" detection issues and focus my attention on key mapping instead.

Thanks for all the help, though!

Dan
post #33 of 60
Usually one hopes to resolve the problem, and learn something in the process. Sorry you couldn't get it working.
post #34 of 60
Thread Starter 
Sometimes knowing your limits counts as learning something. smile.gif

At the very least, I've got a guide of troubleshooting steps to walk through for future reference...

Dan
post #35 of 60
Thread Starter 
I got my new Rosewill 11002 remote/receiver this weekend and have started playing around with it. No out-of-the-box functionality in Movie Player or VLC, but initial testing looks more encouraging than previously. Here's where I'm at:
Code:
sudo ir-keytable
Found /sys/class/rc/rc0/ (/dev/input/event4) with:
        Driver mceusb, table rc-rc6-mce
        Supported protocols: NEC RC-5 RC-6 JVC SONY LIRC other 
        Enabled protocols: RC-6 
        Repeat delay = 500 ms, repeat period = 125 ms

"sudo ir-keytable -d /dev/input/event4" leads to the same output as above.

Following these instructions:

http://forum.xbmc.org/showthread.php?tid=101151

I've copied over the rc6_mce file, but I'm not entirely sure how to proceed. When I run "ir-keytable -c" and "ir-keytable -t", I get output such as:

Play:
1352085890.783132: event MSC: scancode = 800f0416
1352085890.783133: event sync
1352085890.937136: event MSC: scancode = 800f0416
1352085890.937137: event sync

Pause:
1352086001.007311: event MSC: scancode = 800f0418
1352086001.007312: event sync
1352086001.162316: event MSC: scancode = 800f0418
1352086001.162317: event sync

Stop:
1352086044.595964: event MSC: scancode = 800f0419
1352086044.595965: event sync
1352086044.749988: event MSC: scancode = 800f0419
1352086044.749989: event sync

Is it a problem that I'm getting double key presses registered each time? The xbmc forum thread has different format scancodes in the example, but looking in my rc6_mce file, I see:

0x800f0416 KEY_PLAY

So, that would seem to fit the 800f0416 I'm getting. In which case, I guess the question is, why isn't the remote doing anything? Do I need to reinstall LIRC to handle the functionality that is set up by ir-keytable? I'm a bit unclear on that point...

Dan
post #36 of 60
In that How-To he is using the devinput module in LIRC. So, then you would need to use LIRC.

It seems to be pretty informative, but since I am not using LIRC, I really can't add to it. I don't recall, but I don't believe you are using XBMC, but VLC. The last time I used LIRC, I found that I could make different keymap files for each app, and then it worked properly for each app. If you just want it to work with VLC, I don't think you need LIRC, but to just make a custom keymap file that works for VLC. This is what I did for MythTV. First I got a list of all valid key names available:
Code:
irrecord --list-namespace

I then mapped the ones I wanted to the outputs that the remote was giving. I ended up with this:
Code:
# table rc6_mce, type: RC6
# remote: Rosewill RRC-126
# keymaps for MythTV
0x800f0400 KEY_NUMERIC_0
0x800f0401 KEY_NUMERIC_1
0x800f0402 KEY_NUMERIC_2
0x800f0403 KEY_NUMERIC_3
0x800f0404 KEY_NUMERIC_4
0x800f0405 KEY_NUMERIC_5
0x800f0406 KEY_NUMERIC_6
0x800f0407 KEY_NUMERIC_7
0x800f0408 KEY_NUMERIC_8
0x800f0409 KEY_NUMERIC_9
0x800f040a KEY_DELETE
0x800f040b KEY_ENTER
0x800f040c KEY_SLEEP
0x800f040d KEY_MEDIA
0x800f040e KEY_MUTE
0x800f040f KEY_I
0x800f0410 KEY_VOLUMEUP
0x800f0411 KEY_VOLUMEDOWN
0x800f0412 KEY_CHANNELUP
0x800f0413 KEY_CHANNELDOWN
0x800f0414 KEY_FASTFORWARD
0x800f0415 KEY_REWIND
0x800f0416 KEY_PLAY
0x800f0417 KEY_RECORD
0x800f0418 KEY_PAUSE
0x800f0419 KEY_STOP
0x800f041a KEY_NEXT
0x800f041b KEY_PREVIOUS
0x800f041c KEY_NUMERIC_POUND
0x800f041d KEY_NUMERIC_STAR
0x800f041e KEY_UP
0x800f041f KEY_DOWN
0x800f0420 KEY_LEFT
0x800f0421 KEY_RIGHT
0x800f0422 KEY_ENTER    #used to be "OK"
0x800f0423 KEY_ESC
0x800f0424 KEY_DVD
0x800f0425 KEY_TUNER
0x800f0426 KEY_S
0x800f0427 KEY_W
0x800f0432 KEY_MODE
0x800f0433 KEY_PRESENTATION
0x800f0434 KEY_EJECTCD
0x800f043a KEY_BRIGHTNESSUP
0x800f0446 KEY_TV
0x800f0447 KEY_AUDIO
0x800f0448 KEY_PVR
0x800f0449 KEY_CAMERA
0x800f044a KEY_VIDEO
0x800f044c KEY_LANGUAGE
0x800f044d KEY_TITLE
0x800f044e KEY_PRINT
0x800f0450 KEY_RADIO
0x800f045a KEY_SUBTITLE
0x800f045b KEY_RED
0x800f045c KEY_GREEN
0x800f045d KEY_YELLOW
0x800f045e KEY_BLUE
0x800f0465 KEY_POWER2
0x800f046e KEY_PLAYPAUSE
0x800f046f KEY_PLAYER
0x800f0480 KEY_BRIGHTNESSDOWN
0x800f0481 KEY_PLAYPAUSE
I saved it in /etc/rc_keymaps/ as rc6_mce, replacing the original. But, like a dumbass, I didn't first save a copy of the original. I haven't needed the original one again, yet. smile.gif
post #37 of 60
Thread Starter 
Quote:
Originally Posted by waterhead View Post

It seems to be pretty informative, but since I am not using LIRC, I really can't add to it.

First I got a list of all valid key names available:
irrecord --list-namespace

When I run that command, I get "The program 'irrecord' is currently not installed. You can install it by typing: sudo apt-get install lirc." Do you have it as part of another package, if you're not using LIRC?
Quote:
I don't recall, but I don't believe you are using XBMC, but VLC.

Correct. I was just following that thread because it seemed like the closest thing to a step by step tutorial that I've been able to find. (Is there any reason to choose VLC over Mint's Movie Player or vice versa?)

Where I'm stumped is that the keymaps you listed are nearly identical to those of the default rc6_mce file, and the appear to match my "ir-keytable -t" tests, but nothing happens in VLC or Movie Player. It seems like there must be another step necessary in order to get them recognizing the remote input?

Dan
post #38 of 60
Thread Starter 
It sort of seems like reinstalling LIRC and following a process like this is necessary:

http://forums.linuxmint.com/viewtopic.php?f=42&t=106847

Did I misunderstand you that ir-keytable is supposed to do away with the need to run LIRC?

Dan
post #39 of 60
It does look as if I do have LIRC installed, otherwise I would not be able to get the list of keys. The How-To that you referred to has a link to the exact same list:

http://xbmc.exstatic.org/ir_keys.txt

Without LIRC, the remote is seen as a keyboard type of device. This way you can map the buttons on the remote to already established keyboard shortcuts that most programs have. I don't have a list of those shortcuts that VLC can use (EDIT: See further down for info on that), but I did discover something else:

First, in Linux you often can get more info on an application by running it from the terminal. Try these commands, and you will see what I mean.

A very large list of what VLC can do.
Code:
vlc --help

A list of available modules:
Code:
vlc -l

Looking for specific modules for remotes:
Code:
$ vlc -l | grep rc
VLC media player 1.1.9 The Luggage (revision exported)
  oldrc                  Remote control interface
  lirc                   Infrared remote control interface
  dirac                  Dirac video encoder using dirac-research library

Info on the oldrc module:
Code:
$ vlc -p oldrc --advanced
VLC media player 1.1.9 The Luggage (revision exported)

 Remote control interface (oldrc)
      --rc-show-pos, --no-rc-show-pos
                                 Show stream position (default disabled)
      --rc-fake-tty, --no-rc-fake-tty
                                 Fake TTY (default disabled)
      --rc-unix <string>         UNIX socket command input
      --rc-host <string>         TCP command input

Info on the LIRC module:
Code:
vlc -p lirc --advanced
VLC media player 1.1.9 The Luggage (revision exported)

 Infrared remote control interface (lirc)
      --lirc-file <string>       Change the lirc configuration file

Now, if you open VLC and go to Tools-->Preferences, then on the bottom left under "Show settings" select select "All".
Then under Interface-->Main Interfaces, if you select the box "Remote control interface", "oldrc" appears in the line at the bottom. I am not sure if this will get anything working, but it is one of the modules that was found via the terminal commands. If you go to Interface-->Control interfaces, checking the "Infrared remote control interface" box then shows the "lirc" module at the bottom.

Almost all of the documentation involving remotes is going to include LIRC. It has been the only way remotes could be used in Linux for quite some time. Using the new kernel modules is, well, new. There is not much documentation about this yet. You may be better off using LIRC and the LIRC devinput module. That way you can follow all of the old posts that explain how to do this. In fact, I still have my old LIRC file containing the VLC configurations for a remote.

If you want to try just using the new kernel module for the remote, I think I may have found a way. In the same VLC configuration window, go to Interface-->Hotkeys settings. There is a list of the hotkeys that can be used for different VLC controls. I see no reason why you couldn't change them to match a new config file that you can make for the remote. Use the keys names from the keylist referred to earlier. You may need to change the default VLC hotkeys because they contain a lot "Alt", "Ctrl" and "Shift" combinations, and I don't know if it is easy to map them for the remote.

As always, before you change things, write down what it is before you change it. This way you can always restore it to the original settings, if needed.
Edited by waterhead - 11/5/12 at 5:10am
post #40 of 60
Thread Starter 
Quote:
It does look as if I do have LIRC installed, otherwise I would not be able to get the list of keys.

That makes more sense. smile.gif

With that knowledge, I've been trying to follow through the XBMC thread again. Can't say I've made any progress, though. All of your keymaps match the "ir-keytable -t" output for my remote. I've edited all the files per that thread's instructions, but lircd.conf seems to be the sticking point. With the default:

#Configuration for the Windows Media Center Transceivers/Remotes (all) remote:
include "/usr/share/lirc/remotes/mceusb/lircd.conf.mceusb"

I get output irw such as:

000000037ff07be9 00 KEY_PLAY mceusb

but I get no output if I change it to:

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

I've confirmed that the file is there. I'm guessing devinput isn't being loaded properly?
Quote:
Now, if you open VLC and go to Tools-->Preferences, then on the bottom left under "Show settings" select select "All".
Then under Interface-->Main Interfaces, if you select the box "Remote control interface", "oldrc" appears in the line at the bottom. I am not sure if this will get anything working, but it is one of the modules that was found via the terminal commands.

That sounded promising, but I tried it out and still no remote functionality in VLC...
Quote:
If you want to try just using the new kernel module for the remote, I think I may have found a way. In the same VLC configuration window, go to Interface-->Hotkeys settings. There is a list of the hotkeys that can be used for different VLC controls. I see no reason why you couldn't change them to match a new config file that you can make for the remote.

That's an interesting idea. I found this list of VLC hotkeys yesterday when searching for some info:

https://getsatisfaction.com/spawnlabs/topics/vlc_hotkeys

Wouldn't that require VLC recognizing the remote as a keyboard (sort of full circle to the initial ir-keytable question)?

Dan
post #41 of 60
Yes, using the remote as a type of keyboard input is how the non-lirc kernel driver works. Have you played a movie in VLC and tried the keyboard hotkeys? If that works, then you should be able to set up something that the remote can do. I used existing MythTV hotkeys and mapped them to my remote, so you should be able to do something similar with VLC.
post #42 of 60
I have been toying with this some more on my desktop PC, running Ubuntu. I completely rewrote the config file for my remote (/lib/udev/rc_keymaps/rc6_mce) and replaced it with a few codes meant to only work for VLC:
Code:
0x800f0410 KEY_CTRL+KEY_UP
0x800f0411 KEY_CTRL+KEY_DOWN
0x800f040e KEY_M
0x800f0415 KEY_ALT+KEY_LEFT
0x800f0416 KEY_SPACE
0x800f0417 KEY_RECORD
0x800f0418 KEY_SPACE
0x800f0419 KEY_S
0x800f0422 KEY_ENTER
0x800f0423 KEY_ESC
0x800f0427 KEY_F

I reboot after every change, yet it acts as if I didn't change anything. I then realized that it gets the needed info from the /etc folder. First, open this file for editing:
Code:
gksu gedit /etc/rc_maps.cfg

And uncomment this line (remove the # sign at the beginning of the line):
Code:
*    rc-rc6-mce               rc6_mce

Save and exit that file. I then copied my edited rc6_mce file into the /etc/rc_keymaps/ folder:
Code:
sudo cp /lib/udev/rc_keymaps/rc6_mce /etc/rc_keymaps/

Another reboot, and now the default functions don't work anymore! Progress? That depends how you look at it!! I then opened up VLC and played a video, but the remote still doesn't work.

But, I think I am on the right track. Maybe now I need to change VLC's hotkeys to something that is in the ir_keys list. (Or maybe you try it)
post #43 of 60
I just checked my Fedora based HTPC. Fedora installs all of the config files in /etc/rc_keymaps/, so that is the correct place to put it.
Edited by waterhead - 11/5/12 at 2:13pm
post #44 of 60
Thread Starter 
You were able to replicate my getting to where no key presses register? Congrats! smile.gif

With the VLC hotkeys, you can only edit them to be a keyboard entry ... unless there's some way to edit them at the file level?

I suspect that /etc/rc_maps.cfg is the root of the problem. The author of the XBMC thread admits to being very confused how to use it, recommending this addition:

/usr/bin/ir-keytable -c
/usr/bin/ir-keytable -p NEC,RC6 -w /etc/rc_keymaps/rc6_mce

But in the notes at the top of the file, it says:

# To use, you just need to run:
# ./ir-keytable -a

(I've tried it several ways to no avail.) Also, you said, with regards to the same file, "And uncomment this line (remove the # sign at the beginning of the line):"
Code:
*    rc-rc6-mce               rc6_mce

There's no pound sign on that line in my file, so I'm assuming it wasn't commented out in my setup. However, mine has a bit more detail:
Code:
*    rc-rc6-mce               /lib/udev/rc_keymaps/rc6_mce

Could it be that I need to change that path to /etc/rc_keymaps/rc6_mce so it sees the updated file?? (Doesn't seem to have done anything. Is rebooting necessary to see such changes, or should restarting LIRC do the trick?)

Is the only advantage to going through all this that it's easier to edit the ir-keytable mappings than the LIRC mappings?

Dan
post #45 of 60
I see that to test a cofig file you really don't need to reboot. You clear the old file with the -c option. Then load the new one giving the full path.

The reason for using this method of configuring the remote is because this is the way of the future. But, I can't seem to get it to work with VLC using the same method I used for MythTV. I don't have much more to add, so maybe you need to use LIRC.
post #46 of 60
Ok, here's a post telling how to do exactly what you are trying to do. It seems to be saying the same thing that I was. I tried it with the same results, it still don't work!

I did figure out that VLC has two hotkey settings, one being global.

http://ubuntuforums.org/showthread.php?t=2073948
post #47 of 60
I just tried this on my laptop, which has a much newer version of Linux Mint on it. I used a combination of the keymaps that I listed before, and the ones suggested in that Ubuntu forums post. I have these keys working:

Play
Pause
Stop
Fullscreen
Mute

I wasn't able to reassign the keys in VLC global. The volume keys control the system volume, not VLC volume, although the mute seems to be using the VLC mute. I used the Zoom key on the remote for the fullscreen key. Also, the forward/back key reassigning didn't work. Here's the latest file I used:
Code:
# table rc6_mce, type: RC6
0x800f0400 KEY_NUMERIC_0
0x800f0401 KEY_NUMERIC_1
0x800f0402 KEY_NUMERIC_2
0x800f0403 KEY_NUMERIC_3
0x800f0404 KEY_NUMERIC_4
0x800f0405 KEY_NUMERIC_5
0x800f0406 KEY_NUMERIC_6
0x800f0407 KEY_NUMERIC_7
0x800f0408 KEY_NUMERIC_8
0x800f0409 KEY_NUMERIC_9
0x800f040a KEY_DELETE
0x800f040b KEY_ENTER
0x800f040c KEY_SLEEP
0x800f040d KEY_MEDIA
0x800f040e KEY_M
0x800f040f KEY_INFO
0x800f0410 KEY_VOLUMEUP
0x800f0411 KEY_VOLUMEDOWN
0x800f0412 KEY_CHANNELUP
0x800f0413 KEY_CHANNELDOWN
0x800f0414 KEY_RIGHT
0x800f0415 KEY_LEFT
0x800f0416 KEY_SPACE
0x800f0417 KEY_RECORD
0x800f0418 KEY_SPACE
0x800f0419 KEY_S
0x800f041a KEY_NEXT
0x800f041b KEY_PREVIOUS
0x800f041c KEY_NUMERIC_POUND
0x800f041d KEY_NUMERIC_STAR
0x800f041e KEY_UP
0x800f041f KEY_DOWN
0x800f0420 KEY_LEFT
0x800f0421 KEY_RIGHT
0x800f0422 KEY_OK
0x800f0423 KEY_ESC
0x800f0424 KEY_DVD
0x800f0425 KEY_TUNER
0x800f0426 KEY_EPG
0x800f0427 KEY_F
0x800f0432 KEY_MODE
0x800f0433 KEY_PRESENTATION
0x800f0434 KEY_EJECTCD
0x800f043a KEY_BRIGHTNESSUP
0x800f0446 KEY_TV
0x800f0447 KEY_AUDIO
0x800f0448 KEY_PVR
0x800f0449 KEY_CAMERA
0x800f044a KEY_VIDEO
0x800f044c KEY_LANGUAGE
0x800f044d KEY_TITLE
0x800f044e KEY_PRINT
0x800f0450 KEY_RADIO
0x800f045a KEY_SUBTITLE
0x800f045b KEY_RED
0x800f045c KEY_GREEN
0x800f045d KEY_YELLOW
0x800f045e KEY_BLUE
0x800f0465 KEY_POWER2
0x800f046e KEY_PLAYPAUSE
0x800f046f KEY_PLAYER
0x800f0480 KEY_BRIGHTNESSDOWN
0x800f0481 KEY_PLAYPAUSE
post #48 of 60
Thread Starter 
Quote:
Originally Posted by waterhead View Post

Ok, here's a post telling how to do exactly what you are trying to do. It seems to be saying the same thing that I was. I tried it with the same results, it still don't work!
I did figure out that VLC has two hotkey settings, one being global.
http://ubuntuforums.org/showthread.php?t=2073948

Success!!! Excellent find. There's one mistake in the instructions in that thread:
Code:
sudo ir-keytable -c -p RC-6 -w /etc/rc-keymaps/rc6_mce

should be:
Code:
sudo ir-keytable -c -p RC-6 -w /etc/rc_keymaps/rc6_mce

Note the underscore in "rc_keymaps." Following those steps, play/pause/stop all work perfectly in VLC. I haven't tested everything else out fully, but it looks like I can undo some of the testing stuff I did previously and uninstall LIRC.

Thank you SO MUCH for patiently answering all the questions and testing stuff at your end! If I can, I'll update the first post in this thread with updated info for anyone else looking for a solution.

Dan
post #49 of 60
Seems the Forward/Back keys are now working too. In VLC I assigned:

Very short backwards jump: Left

Very short forward jump: Right

These are now mapped to the RWD & FWD keys on my remote.
post #50 of 60
Thread Starter 
You got it working on your's, too?

I'm headed out for a bit, but I'll be playing around with it more later. Do you happen to know if something could be done with the green Windows button to open VLC (or any specific program)? That would pretty much be the icing on the cake. Along those same lines, I need to figure out VLC's odd setup for opening a disc that's already in the drive. It seems like it only finds it if you Browse for available media. I don't see any way to tell it to always look in the same place. At least it knows what to do for auto-starting VLC when a disc is inserted, which covers 99% of regular usage.

Next step is to learn the Rosewill commands onto my MX-500 universal remote... That didn't work with the first PC remote I tried, perhaps because of the remote/keyboard confusion.

Dan
post #51 of 60
For the other VLC controls, you may want to remove all of the other hotkey settings. Then you can replace them with easier to map hotkeys.

As for starting VLC with it always pointing to the same directory, look at the man pages for VLC.
Code:
NAME
       vlc, qvlc, svlc, nvlc, rvlc, cvlc - the VLC media player

SYNOPSIS
       vlc [OPTIONS] [ITEMS]...

DESCRIPTION
       This manual page documents briefly the VLC multimedia player and server.

OPTIONS
       VLC  follows  the  usual  GNU  command  line  syntax, with long options starting with two dashes (`-').  For a precise description of
       options, please use "vlc --help".

       The complete list of VLC options depends on what plugins are installed because they automatically add their own options.  Please  use
       "vlc --longhelp --advanced" for a complete list of available options.

ITEMS
       VLC recognizes several URL-style items:

       *.mpg, *.vob, *.avi, *.mp3, *.ogg
              Various multimedia file formats

       dvd://[<device>][@<raw device>][@[<title>][:[<chapter>][:<angle>]]]
              DVD device (for instance dvd:///dev/dvd). The raw device is optional and must have been prepared beforehand.

       vcd://[<device>][@{E|P|E|T|S}[<number>]]
              VCD device (for instance vcd:///dev/cdrom).

       udp://[@[<multicast address>][:<local port>]]
              UDP stream, such as one sent by VLS or another VLC.  Usually "udp://" is enough.

       http://<server address>[:<server port>]/[<file>]
              HTTP stream

       rtsp://<server address>[:<server port>]/<stream name>
              RTSP Video On Demand stream

       vlc://<command>
              Execute a playlist command. Commands are: pause (pause execution of other items), and quit (close VLC).

SEE ALSO
       Online documentation: http://www.videolan.org/doc/

AUTHOR
       This manual page was written by Sam Hocevar <sam@zoy.org>, for the Debian GNU/Linux system (but may be used by others).

I think this one might work:
Code:
dvd://[<device>][@<raw device>][@[<title>][:[<chapter>][:<angle>]]]
              DVD device (for instance dvd:///dev/dvd). The raw device is optional and must have been prepared beforehand.

You can always put the entire start command into a bash script, then start VLC using that script.
post #52 of 60
Thread Starter 
I'll go back through and make a full list somehow/somewhere, but here are some of the mappings I've changed that are working well in VLC. Keep in mind, I'm setting this up for just VLC presently, so I'm repurposing some of the common buttons to do specific jobs. (My audio will be handled by the preamp.) Assuming I can copy everything over to the universal remote, they'll get LCD labels and the actual button won't much matter.

rc6_mce:
Code:
0x800f040e KEY_EQUAL # was KEY_MUTE -> VLC normal speed
0x800f0410 KEY_F        # was KEY_VOLUMEUP, F = fullscreen
0x800f0411 KEY_ESC      # was KEY_VOLUMEDOWN, ESC = Leave Fullscreen
0x800f0412 KEY_KPPLUS   # was KEY_CHANNELUP, + = VLC faster
0x800f0413 KEY_KPMINUS  # was KEY_CHANNELDOWN, - = VLC slower
0x800f0414 KEY_RIGHTBRACE       # was KEY_FASTFORWARD ... supposed to map to KEY_RIGHT for VLC Faster (fine)
0x800f0415 KEY_LEFTBRACE        # was KEY_REWIND ... supposed to map to KEY_LEFT for VLC Slower (fine)
0x800f0416 KEY_SPACE    # was KEY_PLAY
0x800f0418 KEY_SPACE    # was KEY_PAUSE
0x800f0419 KEY_S        # was KEY_STOP
0x800f041a KEY_N        # was KEY_NEXT
0x800f041b KEY_P        # was KEY_PREVIOUS

There is a KEY_MINUS but no corresponding KEY_PLUS in the reference list I was going by, but the KPPLUS/KPMINUS seem to do the trick. The RIGHTBRACE/LEFTBRACE maps to what VLC expects for forward/rewind, without having to use the right/left arrow keys which seem much more important for menu navigation.

With the above tweaks, all the play/pause and speed control is maintained. I should perhaps do something with actual rewind options still...

After any changes, do:

sudo ir-keytable -c -p RC-6 -w /etc/rc_keymaps/rc6_mce

to reload the file and update the mappings.

In VLC's hotkeys, I changed Mute (M) to Shift+M so I could "M" for the more logical DVD Menu. Lots of similar stuff you can do, but it's easy to get confused with what is going where, so I'm trying to change as little as possible with the hotkeys themselves.

Dan
post #53 of 60
You can always use the system-wide KEY_MUTE, and map that to the Mute button on the remote.

You also may want to include the model remote you are using, when you post your finished results. Just for clarification to anyone reading this thread for help with their own remote.

If we could figure out how to use multiple key combinations in the config file, that would be of use too. The one method I tried didn't work.
post #54 of 60
Thread Starter 
Quote:
Originally Posted by waterhead View Post

Seems the Forward/Back keys are now working too. In VLC I assigned:
Very short backwards jump: Left
Very short forward jump: Right
These are now mapped to the RWD & FWD keys on my remote.

You were able to get "very short" (+/- 3 sec) working with a single keystroke? That, "short" (+/- 10 sec), and several others, never change within VLC for me. I map it to a different hotkey and it still responds to the old one. (Ditto for things like toggling audio tracks.) Most of them allow changes, so it's probably some glitch in VLC.

This one doesn't work for me at all:

Medium backwards jump ... Ctrl+Left
Medium forwards jump ... Ctrl+Right

But this one works fine remapped to a single key stroke:

Long Backwards Jump ... Ctrl+Alt+Left (5 min.)
Long Forwards Jump ... Ctrl+Alt+Right

Minor annoyance. I've got most of the functionality set up the way I want, and the Rosewill remote was successfully learned to my universal remote. Here is what I've got for my rc6_mce file, including mapping notes and excluding the buttons my remote doesn't have:
Code:
# table rc6_mce, type: RC6
# remote: Rosewill RHRC-11002
# keymaps for VLC
0x800f0400 KEY_0                                # VLC cycle subtitle track ... KEY_0-9 was KEY_NUMERIC_* (doesn't match VLC)
0x800f0401 KEY_1                                # VLC subtitle position up
0x800f0402 KEY_2                                # VLC subtitle position down
0x800f0403 KEY_B                                # VLC Cycle Audio Track ... was KEY_3 (VLC won't register the change from B)
0x800f0404 KEY_A                                # VLC Cycle Aspect Ratio ... was KEY_4
0x800f0405 KEY_NUMERIC_5
0x800f0406 KEY_NUMERIC_6
0x800f0407 KEY_NUMERIC_7
0x800f0408 KEY_NUMERIC_8
0x800f0409 KEY_NUMERIC_9
0x800f040a KEY_DELETE                   # "Clear"
0x800f040b KEY_ENTER
0x800f040c KEY_SLEEP                    # (puts computer to sleep) ... crashed pc when using it as fullscreen toggle
0x800f040d KEY_MEDIA                    # green Windows button
0x800f040e KEY_EQUAL                    # "Mute" ... was KEY_MUTE -> VLC normal speed
0x800f040f KEY_F                                # was KEY_I, "info" ... purpose? -> F = VLC fullscreen toggle (works both directions)
0x800f0410 KEY_RIGHTBRACE               # was KEY_VOLUMEUP ... VLC Faster (fine)
0x800f0411 KEY_LEFTBRACE                # was KEY_VOLUMEDOWN ... VLC Slower (fine)
0x800f0412 KEY_KPPLUS                   # was KEY_CHANNELUP, + = VLC Faster
0x800f0413 KEY_KPMINUS                  # was KEY_CHANNELDOWN, - = VLC Slower
0x800f0414 KEY_Q                        # "Fwd" ... was KEY_FASTFORWARD, VLC Small forwards jump (10 sec) ... not working
0x800f0415 KEY_W                        # "Rwd" ... was KEY_REWIND, VLC Small backwards jump (10 sec) ... not working
0x800f0416 KEY_SPACE                    # "Play" ... was KEY_PLAY (shared with Pause)
0x800f0417 KEY_RECORD
0x800f0418 KEY_SPACE                    # "Pause" ... was KEY_PAUSE (shared with Play)
0x800f0419 KEY_S                                # "Stop" ... was KEY_STOP
0x800f041a KEY_N                                # "Skip Fwd" ... was KEY_NEXT ... VLC Long Forwards Jump (5 min.)
0x800f041b KEY_P                                # "Skip Back" ... was KEY_PREVIOUS ... VLC Long Backwards Jump (5 min.)
0x800f041c KEY_NUMERIC_POUND
0x800f041d KEY_NUMERIC_STAR
0x800f041e KEY_UP
0x800f041f KEY_DOWN
0x800f0420 KEY_LEFT
0x800f0421 KEY_RIGHT
0x800f0422 KEY_ENTER                    #used to be "OK"
0x800f0423 KEY_ESC                              # "Back"
0x800f0424 KEY_DVD                              # "DVD Menu"
0x800f0425 KEY_TUNER                    # "Live TV"
0x800f0426 KEY_INFO                             # "Guide" ... was KEY_S
0x800f0447 KEY_AUDIO                    # "Music"
0x800f0448 KEY_PVR                              # "Record TV"
0x800f0449 KEY_CAMERA                   # "Pictures"
0x800f044a KEY_VIDEO                    # "Videos"
0x800f0450 KEY_RADIO

I started just using the number keys as temporary homes for some of the functions I wanted to transfer over to the universal remote...

I found that VLC's fullscreen toggle works with a single in/out button, so no point using two for it.

The sleep button on the Rosewill remote is dangerous. The first time I tried it, it put the computer to sleep (I thought it powered down), and the second time after trying to map it to something else it crashed the whole thing. Definitely not learning that one to the universal!
Quote:
If we could figure out how to use multiple key combinations in the config file, that would be of use too. The one method I tried didn't work.

I've had no luck figuring that out, either, thus the reliance on single-key presses for VLC functions.

Dan
post #55 of 60
Quote:
Originally Posted by dkap View Post

You were able to get "very short" (+/- 3 sec) working with a single keystroke? That, "short" (+/- 10 sec), and several others, never change within VLC for me. I map it to a different hotkey and it still responds to the old one. (Ditto for things like toggling audio tracks.) Most of them allow changes, so it's probably some glitch in VLC.
This one doesn't work for me at all:
Medium backwards jump ... Ctrl+Left
Medium forwards jump ... Ctrl+Right
But this one works fine remapped to a single key stroke:
Long Backwards Jump ... Ctrl+Alt+Left (5 min.)
Long Forwards Jump ... Ctrl+Alt+Right
Minor annoyance. I've got most of the functionality set up the way I want, and the Rosewill remote was successfully learned to my universal remote.

I don't know. I was able to get my remote to work on my laptop, but I don't use a remote on my laptop. I was just testing things out for you, and you are now the expert on this. tongue.gif
Quote:
Originally Posted by dkap View Post

I found that VLC's fullscreen toggle works with a single in/out button, so no point using two for it.
Not sure what you mean by this. The Key_F map is what works for fullscreen.
Quote:
Originally Posted by dkap View Post

The sleep button on the Rosewill remote is dangerous. The first time I tried it, it put the computer to sleep (I thought it powered down), and the second time after trying to map it to something else it crashed the whole thing. Definitely not learning that one to the universal!
I've had no luck figuring that out, either, thus the reliance on single-key presses for VLC functions.
Dan
I agree, the sleep button is bad. I have hit this one accidentally more than once. I think using a custom mapping file, and removing the code for this key, may disable it.
post #56 of 60
Quote:
Originally Posted by waterhead View Post

I agree, the sleep button is bad. I have hit this one accidentally more than once. I think using a custom mapping file, and removing the code for this key, may disable it.
If you want to have a little fun, maybe you could map this key to bring up an error message. In Ubuntu/Debian the Zenity program uses a bash file to create message windows. After installing Zenity, you can run a script like this:
Code:
#!/bin/bash

zenity --warning --text="Do Not Press This Button!! " &
sleep 2
zpid=$!
kill $zpid"

Make it executable with the chmod +x command, and it will give a pop-up window like this:



Not sure if this can actually be mapped to a button, but it might be fun to try.

EDIT: I updated the script to make it close without having to press another button.
Edited by waterhead - 11/8/12 at 6:04am
post #57 of 60
Thread Starter 
Quote:
Originally Posted by waterhead View Post

I don't know. I was able to get my remote to work on my laptop, but I don't use a remote on my laptop. I was just testing things out for you, and you are now the expert on this. tongue.gif

Scary thought, huh? smile.gif
Quote:
Not sure what you mean by this. The Key_F map is what works for fullscreen.

I just meant that the default hotkeys in VLC call for "F" for fullscreen and "ESC" for leaving fullscreen, unlike Play/Pause that both use the space key or can be triggered by separate keys, but "F" also works for leaving fullscreen. A single key works for both even though the option isn't presented in the hotkeys mapping.
Quote:
I agree, the sleep button is bad. I have hit this one accidentally more than once. I think using a custom mapping file, and removing the code for this key, may disable it.

I would definitely disable it (since remapping it proved disastrous) if using the Rosewill remote. Since it will spend the bulk of its life in a box full of its fellow OEM remote brethren, not a big deal.
Quote:
If you want to have a little fun, maybe you could map this key to bring up an error message. In Ubuntu/Debian the Zenity program uses a bash file to create message windows. After installing Zenity, you can run a script like this:

Probably not on my list of priorities smile.gif but it does give me a lead for how to try setting up the DVD drive default locator you suggested a few posts back...

By the way, one of the reasons I didn't buy the Rosewill remote, or something similar, originally was the idea of the USB dongle instead of a full IR receiver with wide angle face. I had read that some of the dongles accept a pretty narrow range, especially if you're angled down on its line of sight. Not this one! It works from a good distance and from any angle I've tried, including a full 90 degrees in any direction. Very impressive.

Dan
post #58 of 60
I see there is the KEY_FILE and KEY_MACRO mappings available. Not sure how to use them, though.
post #59 of 60
Quote:
Originally Posted by dkap View Post

Probably not on my list of priorities smile.gif but it does give me a lead for how to try setting up the DVD drive default locator you suggested a few posts back...
I used to have several scripts I made to use zenity this way. I think they were on a hard drive that died, and I never thought of them being important enough to back up. But, I did locate two files that demonstrate how zenity can be used.
Code:
#!/bin/bash
#zenity_help

topic=$(zenity --title="Zenity Help" --list --height=500 --text="Choose what help you want" --radiolist --column="" --column="Topic" e general r calendar t entry y error u info i file-selection o list p notification a progress s warning d question f scale g text-info h misc i gtk)
zenity --info --text="$(zenity --help-$topic)" --title="Zenity Help"
Code:
#!/bin/bash
#zenity_test

## ZENITY TEST SCRIPT ##

function calander { zenity --calendar
}
function entry { zenity --entry 
}
function error { zenity --error 
}
function fileselect { zenity --file-selection 
}
function info { zenity --info
}
function list { zenity --list --column=COLUMN
}
function notification { zenity --notification --text=TEXT
}
function progress { zenity --progress
}
function question { zenity --question
}
function textinfo {     zenity --text-info
}
function warning { zenity --warning
}
function scale { zenity --scale
}
function colorselection { zenity --color-selection
}
function listtest { result=$(zenity --list --text "Avalible GUI Items" --radiolist --column " " --column " " FALSE calendar FALSE entry FALSE error FALSE "file selection" FALSE info FALSE list FALSE notification FALSE progress FALSE question FALSE "text info" FALSE warning FALSE scale FALSE "color selection");
                                        listout
}
function listout {
        if [ "$result" = "calendar" ] ; then
                calendar
                listtest
        elif [ "$result" = "entry" ] ; then
                entry
                listtest
        elif [ "$result" = "error" ] ; then
                error
                listtest
        elif [ "$result" = "file selection" ] ; then
                fileselect
                listtest
        elif [ "$result" = "info" ] ; then
                info
                listtest
        elif [ "$result" = "list" ] ; then
                list
                listtest
        elif [ "$result" = "notification" ] ; then
                notification
                listtest
        elif [ "$result" = "preogress" ] ; then
                progress
                listtest
        elif [ "$result" = "question" ] ; then
                question
                listtest
        elif [ "$result" = "text info" ] ; then
                textinfo
                listtest
        elif [ "$result" = "warning" ] ; then
                warning
                listtest
        elif [ "$result" = "scale" ] ; then
                warning
                listtest
        elif [ "$result" = "color selection" ] ; then
                colorselection
                listtest
        else
                clear
                menu
        fi
}
function menu {
clear   # Clear terminal
tput cup 2 20 ; echo -n " MENU "                      
tput cup 3 2 ; echo -n "  1. Calendar "
tput cup 4 2 ; echo -n "  2. Entry "
tput cup 5 2 ; echo -n "  3. Error "
tput cup 6 2 ; echo -n "  4. File Selection "
tput cup 7 2 ; echo -n "  5. Info "
tput cup 8 2 ; echo -n "  6. List "
tput cup 9 2 ; echo -n "  7. Notification "
tput cup 10 2 ; echo -n "  8. Progress "
tput cup 11 2 ; echo -n "  9. Question "
tput cup 12 2 ; echo -n " 10. Text Info "
tput cup 13 2 ; echo -n " 11. Warning "
tput cup 14 2 ; echo -n " 12. Scale "
tput cup 15 2 ; echo -n " 13. Colour Selection"
tput cup 3 25 ; echo -n " 14. List Test "
tput cup 17 2 ; echo -n " Enter your choice: "

read choice
tput cup 18 10

case $choice
in
        1) calander ;;
        2) entry ;;
        3) error ;;
        4) fileselect ;;
        5) info ;;
        6) list ;;
        7) notification ;;
        8) progress ;;
        9) question ;;
        10) textinfo ;;
        11) warning ;;
        12) scale ;;
        13) colorselection ;;
        14) listtest ;;
        quit) exit 0 ;;
        *) tput cup 19 10 ; echo "\"$choice\" is not a valid option." ; sleep 1 ; menu ;;
esac
}
menu


By the way, one of the reasons I didn't buy the Rosewill remote, or something similar, originally was the idea of the USB dongle instead of a full IR receiver with wide angle face. I had read that some of the dongles accept a pretty narrow range, especially if you're angled down on its line of sight. Not this one! It works from a good distance and from any angle I've tried, including a full 90 degrees in any direction. Very impressive.
Dan[/quote]
Glad you're happy with the purchase.
Edited by waterhead - 11/8/12 at 8:58am
post #60 of 60
Thread Starter 
Quote:
Originally Posted by waterhead View Post

I see there is the KEY_FILE and KEY_MACRO mappings available. Not sure how to use them, though.

Ditto. I did solve the remaining hotkeys problems, though. It seems that some of the VLC hotkeys don't quite update to reflect the changes until you shut down and restart the program. They all seem to be working now.

Dan
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: HTPC - Linux Chat
AVS › AVS Forum › Video Components › Home Theater Computers › HTPC - Linux Chat › setting up IR remote for DVD playback