How To: Creative Remotes

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
PrometheusG
New Cone
New Cone
Posts: 7
Joined: 15 Jan 2007 09:24

How To: Creative Remotes

Postby PrometheusG » 15 Jan 2007 11:34

I had a bit of a hard time figuring out how to get my Creative Remote (RM-1000) to work with VLC. I finally got it working, but noticed that when I searched this forum, I only found questions with no answers. So, I decided to write up a little guide.

First of all, this should be compatible with any Creative sound card + remote. Secondly, you need to be running the Creative Remote Center. Thirdly, I'm not going to give exact keymap settings, because they vary by remote model and your VLC hotkeys.

Step 1 - Open (your remote).RCI file
Find the directory you installed Creative Remote Center in and navigate to /Rc/RCRx. Open the .RCI file with the name of your remote with your favorite text editor. Notepad works for me. This file contains 2 sets of values you will need: MMCDEvent numbers, and KeyNames.

MMCDEvent=#### represents the code sent by the remote when a key is pressed.
KeyName='somestring' is the name of the key that was pressed.
OneShot=# is unimportant for our purposes. It just changes whether the button should send multiple signals while held down, or just a single button press signal.

Step 2 - Create wxWindowClassNR.key file
From the Creative Remote Center install directory, navigate to /Rc/KeyMap. Create a file called wxWindowClassNR.key. This file will contain the keymappings to control VLC. It's going to look like a windows registry file, but just open it with notepad.

The name of the file tells Creative Remote Center what keymap to use when a window with the name of the file has focus. In this case, wxWindowClassNR is the internal name of the VLC main window.

Step 3 - Make the file header
Easiest way to do this is to open Default.key and copy the first 7 lines to your .key file. You only need to change the second line to the following:
Name=wxWindowClassNR - because that's the name of the VLC main window.

Step 4 - Map your keys
From VLC, open the preferences and look at the Hotkey settings. For the buttons you want to map to the remote, look up the keyboard key's decimal ASCII representation. This should help. Those values are in hex, so watch out! Also, you can only map single keyboard keys, so don't use any Alts, Ctrls, or Shifts.

Step 5 - Each keymap entry is going to follow a simple format:
[KeyEvent####] - #### corresponds to MMCDEvent in the .RCI file.
KeyName="somestring" - "somestring" is what will be displayed when you mash that button on the remote.
Notification=# - # can be one of several values, but for our purposes should just be -1.
KeyEventRemap=## - ## is a decimal ASCII value that corresponds to the keyboard key you want the button mapped to.

A full keymap entry will look like this:
[KeyEvent6906]
KeyName=Kill All Humans
Notification=-1
KeyEventRemap=32


This maps the '6' button on my remote (MMCDEvent 6906) to the keyboard key 'Space Bar' (ASCII 32) and displays "Kill All Humans" (key name) when using VLC.

Whether that does anything in VLC is depends on if I've mapped the space bar to do anything in VLC. If I've mapped fullscreen mode to 'space bar', then pressing the '6' on the remote would toggle fullscreen mode and display "Kill All Humans". Not the most intuitive control, but whatever floats your boat...

Step 6 - Write entries in the key file
We're almost done! Now, for each remote button you want to map, follow the format outlined in step 5. Not hard, but probably the most tedious step. Copy and Paste are your friends!

Step 7 (optional) - VLC DirectX.key file
I had a little bit of trouble once when using fullscreen mode. Sometimes, the fullscreen window gained focus, while the VLC main window (with the player controls) lost focus. This prevented using the remote, because it only controls a window that has a keymap file (the controls window) and has focus.

The way I fixed it, was creating an identical keymap file to wxWindowClassNR.key and calling it "VLC DirectX.key" Change the second line in the file to Name=VLC DirectX. This is the internal name of the rendering window.

Certain buttons won't automatically map, because of settings in Default.key. Some keys are the volume, mute, and eax keys. You can override them by making changes in the Default.key file.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I hope this helps anyone struggling to get the remote to work. You can use the same method to control any app with the remote as long as you know the internal window name. I used Spy++ to get the window class names for VLC (wxWindowClassNR and VLC DirectX) and it's easy enough to get the names for any others.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Postby Jean-Baptiste Kempf » 09 Feb 2007 11:54

Could you put that in the wiki please ?
There is an HOWTO section. And a LIRC howto, you should do the same. Thanks.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

PrometheusG
New Cone
New Cone
Posts: 7
Joined: 15 Jan 2007 09:24

Added it

Postby PrometheusG » 10 Feb 2007 05:33

Thanks for the tip. I added a How To to the wiki.

As for LIRC, I don't know much about it. I haven't used Linux much since I finished college. What's there seems like a pretty decent guide, though.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Postby Jean-Baptiste Kempf » 10 Feb 2007 14:57

Well thanks for the wiki article.

You misunderstood me ^^, I was meaning "There is already an LIRC Howto, you can inspire yourself of this howto to structure your article."
But you did great ! Thanks.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 50 guests