![]() ![]() |
Nov 2 2005, 10:15 AM
Post
#1
|
|
|
Group: Members Posts: 191 Joined: 4-July 05 Member No.: 7,526 |
Hello,
I am having a ce-rh2 but dont know how to make it working in xmms with rc12. need help pls, thanks in advance, MONVMENTVM EDIT: solved it my self. just had to type "xev" into konsole and press every key of the remote. so i got the keycode of every key. into xmodmap i wrote this keycodes coresponding to the keyboardshortcuts of xmms. for example: keycode 72 = V (this is the key STOP of the remote and the shortcut of stop in xmms is "V"). |
|
|
|
Nov 12 2005, 06:20 PM
Post
#2
|
|
|
Group: Members Posts: 5 Joined: 20-April 05 Member No.: 6,932 |
In case anyone's looking for them, here are the keycodes I recorded for the CE-RH2:
Volume up: 118 Volume Down: 119 Mute: 120 Play/Pause: 64 Stop: 68 Previous: 116 Next: 108 I'm trying to get it to work in Opie now; a less-than-ideal workaround for the moment is to map play to "space", previous to "Left", next to "Right", and stop to "escape"; this will at least work if mediaplayer is already open and has the focus (I think a better solution would be to capture these outside the player and send the appropriate signals; that way volume could be controlled outside the player, and hitting "play" could launch the player if necessary.. if anyone else has any clues on how to do this, let me know |
|
|
|
Jul 13 2006, 07:10 PM
Post
#3
|
|
|
Group: Members Posts: 23 Joined: 20-June 03 Member No.: 179 |
QUOTE(MONVMENTVM @ Nov 2 2005, 10:15 AM) Hello, I am having a ce-rh2 but dont know how to make it working in xmms with rc12. need help pls, thanks in advance, MONVMENTVM EDIT: solved it my self. just had to type "xev" into konsole and press every key of the remote. so i got the keycode of every key. into xmodmap i wrote this keycodes coresponding to the keyboardshortcuts of xmms. for example: keycode 72 = V (this is the key STOP of the remote and the shortcut of stop in xmms is "V"). sorry for stupid question but where it should be describe and could you please paste here that part of config for Xmms. Thanks |
|
|
|
Jul 13 2006, 08:33 PM
Post
#4
|
|
|
Group: Members Posts: 14 Joined: 6-March 06 From: New Zealand Member No.: 9,299 |
XMMS already has shortcut keys that work as long as the window is active.
Z Previous Track X Play/Restart/Unpause C Pause/Unpause V Stop B Next Track |
|
|
|
Jul 13 2006, 08:36 PM
Post
#5
|
|
![]() Group: Members Posts: 2,808 Joined: 21-March 05 From: Sydney, Australia Member No.: 6,686 |
QUOTE(Craigms @ Jul 14 2006, 02:33 PM) XMMS already has shortcut keys that work as long as the window is active. Z Previous Track X Play/Restart/Unpause C Pause/Unpause V Stop B Next Track what needs to be done is to modify the xmms code to listen to the CE-RH2 keys. this is not difficult to do if anyone can be bothered doing it... |
|
|
|
Jul 14 2006, 01:48 AM
Post
#6
|
|
|
Group: Members Posts: 191 Joined: 4-July 05 Member No.: 7,526 |
Yes it's not a hard thing to do... just define the keycode to the corresponding shortcuts for xmms (just look in xmms which key means play, pause stop and so on... i do not know them right now).
The problem is that beta4 doesn't recognize the ce-rh2. |
|
|
|
Jul 14 2006, 12:25 PM
Post
#7
|
|
|
Group: Members Posts: 23 Joined: 20-June 03 Member No.: 179 |
thnks guys. I'm just not sure where to change mapping in config (how?) or source code.
|
|
|
|
Jul 14 2006, 04:25 PM
Post
#8
|
|
![]() Group: Members Posts: 2,808 Joined: 21-March 05 From: Sydney, Australia Member No.: 6,686 |
QUOTE(vlad @ Jul 15 2006, 06:25 AM) you can edit the source and recompile. here's the source segment of interest. in main.c of the xmms source tarball you will need to modify the source under the mainwin_keypress (GtkWidget * w, GdkEventKey * event, gpointer data) function CODE gboolean mainwin_keypress(GtkWidget * w, GdkEventKey * event, gpointer data) { switch(event->keyval) { // added OK/Enter key to activate play case GDK_Return: case GDK_KP_Enter: mainwin_play_pushed(); break; // added Cancel/Escape key to activate stop case GDK_Cancel: case GDK_Escape: mainwin_stop_pushed(); break; // reassigned volume down to N key case GDK_N: case GDK_n: mainwin_set_volume_diff(-2); break; // reassigned volume up to M key case GDK_M: case GDK_m: mainwin_set_volume_diff(2); break; // reassigned Down key to go previous track case GDK_Up: case GDK_KP_Up: playlist_prev(); break; // reassigned Up key to go next track case GDK_Down: case GDK_KP_Down: playlist_next(); break; case GDK_Left: case GDK_KP_Left: if(playlist_get_current_length() != -1) input_seek(CLAMP(input_get_time() - 5000, 0, playlist_get_current_length()) / 1000); break; case GDK_Right: case GDK_KP_Right: if(playlist_get_current_length() != -1) input_seek(CLAMP(input_get_time() + 5000, 0, playlist_get_current_length()) / 1000); break; default: break; } return TRUE; } The above enables you to use OK and CANCEL (both the ones on the keyboard and those two buttons on the back/side of the Z) to play and stop in addition to pressing X and C. It also allows you to use UP and DOWN (again on the keyboard and the back/side keys) to change between song tracks. You can easily add the key symbol for the ce-rh2 to the above, ie change from QUOTE case GDK_Return: case GDK_KP_Enter: mainwin_play_pushed(); break; to QUOTE case GDK_Return:
case GDK_KP_Enter: case GDK_XF86AudioPlay: mainwin_play_pushed(); break; |
|
|
|
Jul 15 2006, 12:16 AM
Post
#9
|
|
|
Group: Members Posts: 191 Joined: 4-July 05 Member No.: 7,526 |
What about /etc/X11/kb/{your_machine}/xmodmap?
It is alot easier to do this as you just need to open it with an editor, and then restart. |
|
|
|
Aug 28 2006, 12:53 PM
Post
#10
|
|
|
Group: Members Posts: 742 Joined: 15-October 05 From: Gulag, Siberia Member No.: 8,322 |
I was playing with xmms just now and was pleasantly surprised that the IR remote control plugin actually works! Not very practical but fun nevertheless
|
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 17th June 2013 - 08:34 PM |