Permalink
Browse files

Add native MPlayer volume controls to scripts

  • Loading branch information...
1 parent b01077f commit 3a0860b496e56b94a3539d4fac823bf7e702ce0f flithm committed Mar 22, 2008
View
6 scripts/modules.d/411-ATIX10-MPlayer.py
@@ -102,6 +102,12 @@ def onDeviceEvent(self, Event, Gizmo = None):
elif Event.Code == GizmoKey.KEY_F:
Gizmod.Keyboards[0].createEvent(GizmoEventType.EV_KEY, GizmoKey.KEY_F)
return True
+ elif Event.Code == GizmoKey.KEY_VOLUMEUP:
+ Gizmod.Keyboards[0].createEvent(GizmoEventType.EV_KEY, GizmoKey.KEY_0)
+ return True
+ elif Event.Code == GizmoKey.KEY_VOLUMEDOWN:
+ Gizmod.Keyboards[0].createEvent(GizmoEventType.EV_KEY, GizmoKey.KEY_9)
+ return True
else:
# unmatched event, keep processing
return False
View
8 scripts/modules.d/511-LIRC-Hauppauge-MPlayer.py
@@ -109,10 +109,12 @@ def onDeviceEvent(self, Event, Gizmo = None):
elif Event.Button == "Menu/i":
Gizmod.Keyboards[0].createEvent(GizmoEventType.EV_KEY, GizmoKey.KEY_O)
return True
- elif Event.Button == "Vol+":
- return False
+ elif Event.Button == "Vol+":
+ Gizmod.Keyboards[0].createEvent(GizmoEventType.EV_KEY, GizmoKey.KEY_0)
+ return True
elif Event.Button == "Vol-":
- return False
+ Gizmod.Keyboards[0].createEvent(GizmoEventType.EV_KEY, GizmoKey.KEY_9)
+ return True
elif Event.Button == "Prev.Ch":
Gizmod.Keyboards[0].createEvent(GizmoEventType.EV_KEY, GizmoKey.KEY_H)
return True
View
8 scripts/modules.d/511-LIRC-MceUSB2-MPlayer.py
@@ -119,10 +119,12 @@ def onDeviceEvent(self, Event, Gizmo = None):
return False
elif Event.Button == "Down":
return False
- elif Event.Button == "VolUp":
- return False
+ elif Event.Button == "VolUp":
+ Gizmod.Keyboards[0].createEvent(GizmoEventType.EV_KEY, GizmoKey.KEY_0)
+ return True
elif Event.Button == "VolDown":
- return False
+ Gizmod.Keyboards[0].createEvent(GizmoEventType.EV_KEY, GizmoKey.KEY_9)
+ return True
elif Event.Button == "Home":
return False
elif Event.Button == "ChanUp":

0 comments on commit 3a0860b

Please sign in to comment.