summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-misc/g15daemon/files')
-rw-r--r--app-misc/g15daemon/files/g15daemon-1.2.7.confd2
-rw-r--r--app-misc/g15daemon/files/g15daemon-1.9.5.3-avoid_bashisms.patch20
-rw-r--r--app-misc/g15daemon/files/g15daemon-1.9.5.3-docdir.patch11
-rw-r--r--app-misc/g15daemon/files/g15daemon-1.9.5.3-forgotten-open-mode.patch4
-rw-r--r--app-misc/g15daemon/files/g15daemon-1.9.5.3-g510-keys.patch340
-rw-r--r--app-misc/g15daemon/files/g15daemon-1.9.5.3-overflow-fix.patch4
-rw-r--r--app-misc/g15daemon/files/g15daemon.service11
7 files changed, 47 insertions, 345 deletions
diff --git a/app-misc/g15daemon/files/g15daemon-1.2.7.confd b/app-misc/g15daemon/files/g15daemon-1.2.7.confd
index 08ea97f49763..5ce5392b93b1 100644
--- a/app-misc/g15daemon/files/g15daemon-1.2.7.confd
+++ b/app-misc/g15daemon/files/g15daemon-1.2.7.confd
@@ -2,7 +2,7 @@
# Key to switch the client-screens. Default is the MR key,
# Set to "yes" to use L1 key instead (black round key below the LCD, above the multimedia keys).
-CLIENT_SWITCH_L1="no"
+CLIENT_SWITCH_L1="yes"
# Set to "yes" to switch off the lcd backlight when stopping g15daemon.
BACKLIGHT_OFF="no"
diff --git a/app-misc/g15daemon/files/g15daemon-1.9.5.3-avoid_bashisms.patch b/app-misc/g15daemon/files/g15daemon-1.9.5.3-avoid_bashisms.patch
new file mode 100644
index 000000000000..194d68eefeea
--- /dev/null
+++ b/app-misc/g15daemon/files/g15daemon-1.9.5.3-avoid_bashisms.patch
@@ -0,0 +1,20 @@
+--- g15daemon-1.9.5.3/configure.in
++++ g15daemon-1.9.5.3/configure.in
+@@ -53,7 +53,7 @@
+ AC_ARG_ENABLE([--disable-uinput],[ --disable-uinput do not build linux uinput plugin (default: autodetect)])
+
+ if test "x$enable_uinput" != "xno"; then
+- if test "x$have_linux_uinput_h" == "xyes"; then
++ if test "x$have_linux_uinput_h" = "xyes"; then
+ #if HAVE_LINUX_UINPUT_H
+ dnl check for uinput.h version 2.4 or 2.6 ?
+ AC_CHECK_MEMBER([struct uinput_user_dev.id],
+@@ -110,7 +110,7 @@
+ AM_CONDITIONAL(UINPUT_INTERFACE_PLUGIN, [test x$uinput = xtrue])
+
+ dnl Some versions of libusb do not honour timeout and block. Suns' version is one of them.
+-if test "x$libusb_blocks" == "xtrue"; then
++if test "x$libusb_blocks" = "xtrue"; then
+ AC_DEFINE([LIBUSB_BLOCKS], [1],[Define if libusb implementation blocks on read or write])
+ fi
+
diff --git a/app-misc/g15daemon/files/g15daemon-1.9.5.3-docdir.patch b/app-misc/g15daemon/files/g15daemon-1.9.5.3-docdir.patch
new file mode 100644
index 000000000000..9c76e4cbc6aa
--- /dev/null
+++ b/app-misc/g15daemon/files/g15daemon-1.9.5.3-docdir.patch
@@ -0,0 +1,11 @@
+--- g15daemon-1.9.5.3/Makefile.am
++++ g15daemon-1.9.5.3/Makefile.am
+@@ -5,7 +5,7 @@
+
+ EXTRA_DIST = debian contrib Documentation lang-bindings patches rpm README.usage FAQ LICENSE images README.Linux README.FreeBSD README.Solaris
+
+-docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION)
++docdir = @docdir@
+ doc_DATA = FAQ README.usage README ChangeLog TODO AUTHORS NEWS LICENSE README.Linux README.FreeBSD README.Solaris
+
+ man1_MANS = $(top_srcdir)/Documentation/g15daemon.1
diff --git a/app-misc/g15daemon/files/g15daemon-1.9.5.3-forgotten-open-mode.patch b/app-misc/g15daemon/files/g15daemon-1.9.5.3-forgotten-open-mode.patch
index b475f1d58d69..d4a5381992e1 100644
--- a/app-misc/g15daemon/files/g15daemon-1.9.5.3-forgotten-open-mode.patch
+++ b/app-misc/g15daemon/files/g15daemon-1.9.5.3-forgotten-open-mode.patch
@@ -1,5 +1,5 @@
---- ./g15daemon-1.9.5.3/g15daemon/utility_funcs.c 2008-01-26 06:02:07.000000000 +0100
-+++ ./g15daemon-1.9.5.3/g15daemon/utility_funcs.c 2009-02-01 17:00:55.203009264 +0100
+--- g15daemon-1.9.5.3/g15daemon/utility_funcs.c
++++ g15daemon-1.9.5.3/g15daemon/utility_funcs.c
@@ -356,7 +356,7 @@
config_items_t * item=NULL;
char line[1024];
diff --git a/app-misc/g15daemon/files/g15daemon-1.9.5.3-g510-keys.patch b/app-misc/g15daemon/files/g15daemon-1.9.5.3-g510-keys.patch
deleted file mode 100644
index e00836766795..000000000000
--- a/app-misc/g15daemon/files/g15daemon-1.9.5.3-g510-keys.patch
+++ /dev/null
@@ -1,340 +0,0 @@
-From https://sourceforge.net/tracker/?func=detail&aid=3152167&group_id=167869&atid=844658
-
-diff -aNru trunk/g15daemon-wip/plugins/g15_plugin_uinput.c mod/g15daemon-wip/plugins/g15_plugin_uinput.c
---- trunk/g15daemon-wip/plugins/g15_plugin_uinput.c 2011-06-26 06:50:50.000000000 +0000
-+++ mod/g15daemon-wip/plugins/g15_plugin_uinput.c 2011-06-26 06:51:42.000000000 +0000
-@@ -164,146 +164,195 @@
-
- static void g15_process_keys(g15daemon_t *masterlist, unsigned int currentkeys, unsigned int lastkeys)
- {
-- /* 'G' keys */
-- if((currentkeys & G15_KEY_G1) && !(lastkeys & G15_KEY_G1))
-- keydown(GKEY_OFFSET);
-- else if(!(currentkeys & G15_KEY_G1) && (lastkeys & G15_KEY_G1))
-- keyup(GKEY_OFFSET);
--
-- if((currentkeys & G15_KEY_G2) && !(lastkeys & G15_KEY_G2))
-- keydown(GKEY_OFFSET+1);
-- else if(!(currentkeys & G15_KEY_G2) && (lastkeys & G15_KEY_G2))
-- keyup(GKEY_OFFSET+1);
--
-- if((currentkeys & G15_KEY_G3) && !(lastkeys & G15_KEY_G3))
-- keydown(GKEY_OFFSET+2);
-- else if(!(currentkeys & G15_KEY_G3) && (lastkeys & G15_KEY_G3))
-- keyup(GKEY_OFFSET+2);
--
-- if((currentkeys & G15_KEY_G4) && !(lastkeys & G15_KEY_G4))
-- keydown(GKEY_OFFSET+3);
-- else if(!(currentkeys & G15_KEY_G4) && (lastkeys & G15_KEY_G4))
-- keyup(GKEY_OFFSET+3);
--
-- if((currentkeys & G15_KEY_G5) && !(lastkeys & G15_KEY_G5))
-- keydown(GKEY_OFFSET+4);
-- else if(!(currentkeys & G15_KEY_G5) && (lastkeys & G15_KEY_G5))
-- keyup(GKEY_OFFSET+4);
--
-- if((currentkeys & G15_KEY_G6) && !(lastkeys & G15_KEY_G6))
-- keydown(GKEY_OFFSET+5);
-- else if(!(currentkeys & G15_KEY_G6) && (lastkeys & G15_KEY_G6))
-- keyup(GKEY_OFFSET+5);
--
-- if((currentkeys & G15_KEY_G7) && !(lastkeys & G15_KEY_G7))
-- keydown(GKEY_OFFSET+6);
-- else if(!(currentkeys & G15_KEY_G7) && (lastkeys & G15_KEY_G7))
-- keyup(GKEY_OFFSET+6);
--
-- if((currentkeys & G15_KEY_G8) && !(lastkeys & G15_KEY_G8))
-- keydown(GKEY_OFFSET+7);
-- else if(!(currentkeys & G15_KEY_G8) && (lastkeys & G15_KEY_G8))
-- keyup(GKEY_OFFSET+7);
--
-- if((currentkeys & G15_KEY_G9) && !(lastkeys & G15_KEY_G9))
-- keydown(GKEY_OFFSET+8);
-- else if(!(currentkeys & G15_KEY_G9) && (lastkeys & G15_KEY_G9))
-- keyup(GKEY_OFFSET+8);
--
-- if((currentkeys & G15_KEY_G10) && !(lastkeys & G15_KEY_G10))
-- keydown(GKEY_OFFSET+9);
-- else if(!(currentkeys & G15_KEY_G10) && (lastkeys & G15_KEY_G10))
-- keyup(GKEY_OFFSET+9);
--
-- if((currentkeys & G15_KEY_G11) && !(lastkeys & G15_KEY_G11))
-- keydown(GKEY_OFFSET+10);
-- else if(!(currentkeys & G15_KEY_G11) && (lastkeys & G15_KEY_G11))
-- keyup(GKEY_OFFSET+10);
--
-- if((currentkeys & G15_KEY_G12) && !(lastkeys & G15_KEY_G12))
-- keydown(GKEY_OFFSET+11);
-- else if(!(currentkeys & G15_KEY_G12) && (lastkeys & G15_KEY_G12))
-- keyup(GKEY_OFFSET+11);
--
-- if((currentkeys & G15_KEY_G13) && !(lastkeys & G15_KEY_G13))
-- keydown(GKEY_OFFSET+12);
-- else if(!(currentkeys & G15_KEY_G13) && (lastkeys & G15_KEY_G13))
-- keyup(GKEY_OFFSET+12);
--
-- if((currentkeys & G15_KEY_G14) && !(lastkeys & G15_KEY_G14))
-- keydown(GKEY_OFFSET+13);
-- else if(!(currentkeys & G15_KEY_G14) && (lastkeys & G15_KEY_G14))
-- keyup(GKEY_OFFSET+13);
--
-- if((currentkeys & G15_KEY_G15) && !(lastkeys & G15_KEY_G15))
-- keydown(GKEY_OFFSET+14);
-- else if(!(currentkeys & G15_KEY_G15) && (lastkeys & G15_KEY_G15))
-- keyup(GKEY_OFFSET+14);
--
-- if((currentkeys & G15_KEY_G16) && !(lastkeys & G15_KEY_G16))
-- keydown(GKEY_OFFSET+15);
-- else if(!(currentkeys & G15_KEY_G16) && (lastkeys & G15_KEY_G16))
-- keyup(GKEY_OFFSET+15);
--
-- if((currentkeys & G15_KEY_G17) && !(lastkeys & G15_KEY_G17))
-- keydown(GKEY_OFFSET+16);
-- else if(!(currentkeys & G15_KEY_G17) && (lastkeys & G15_KEY_G17))
-- keyup(GKEY_OFFSET+16);
--
-- if((currentkeys & G15_KEY_G18) && !(lastkeys & G15_KEY_G18))
-- keydown(GKEY_OFFSET+17);
-- else if(!(currentkeys & G15_KEY_G18) && (lastkeys & G15_KEY_G18))
-- keyup(GKEY_OFFSET+17);
--
-- /* 'M' keys */
--
-- if((currentkeys & G15_KEY_M1) && !(lastkeys & G15_KEY_M1))
-- keydown(MKEY_OFFSET);
-- else if(!(currentkeys & G15_KEY_M1) && (lastkeys & G15_KEY_M1))
-- keyup(MKEY_OFFSET);
--
-- if((currentkeys & G15_KEY_M2) && !(lastkeys & G15_KEY_M2))
-- keydown(MKEY_OFFSET+1);
-- else if(!(currentkeys & G15_KEY_M2) && (lastkeys & G15_KEY_M2))
-- keyup(MKEY_OFFSET+1);
--
-- if((currentkeys & G15_KEY_M3) && !(lastkeys & G15_KEY_M3))
-- keydown(MKEY_OFFSET+2);
-- else if(!(currentkeys & G15_KEY_M3) && (lastkeys & G15_KEY_M3))
-- keyup(MKEY_OFFSET+2);
--
-- if((currentkeys & G15_KEY_MR) && !(lastkeys & G15_KEY_MR))
-- keydown(MKEY_OFFSET+3);
-- else if(!(currentkeys & G15_KEY_MR) && (lastkeys & G15_KEY_MR))
-- keyup(MKEY_OFFSET+3);
--
-- if(map_Lkeys){
-- /* 'L' keys... */
-- if((currentkeys & G15_KEY_L1) && !(lastkeys & G15_KEY_L1))
-- keydown(LKEY_OFFSET);
-- else if(!(currentkeys & G15_KEY_L1) && (lastkeys & G15_KEY_L1))
-- keyup(LKEY_OFFSET);
--
-- if((currentkeys & G15_KEY_L2) && !(lastkeys & G15_KEY_L2))
-- keydown(LKEY_OFFSET+1);
-- else if(!(currentkeys & G15_KEY_L2) && (lastkeys & G15_KEY_L2))
-- keyup(LKEY_OFFSET+1);
--
-- if((currentkeys & G15_KEY_L3) && !(lastkeys & G15_KEY_L3))
-- keydown(LKEY_OFFSET+2);
-- else if(!(currentkeys & G15_KEY_L3) && (lastkeys & G15_KEY_L3))
-- keyup(LKEY_OFFSET+2);
--
-- if((currentkeys & G15_KEY_L4) && !(lastkeys & G15_KEY_L4))
-- keydown(LKEY_OFFSET+3);
-- else if(!(currentkeys & G15_KEY_L4) && (lastkeys & G15_KEY_L4))
-- keyup(LKEY_OFFSET+3);
--
-- if((currentkeys & G15_KEY_L5) && !(lastkeys & G15_KEY_L5))
-- keydown(LKEY_OFFSET+4);
-- else if(!(currentkeys & G15_KEY_L5) && (lastkeys & G15_KEY_L5))
-- keyup(LKEY_OFFSET+4);
-+ if(!(currentkeys & G15_KEY_LIGHT))
-+ {
-+ /* 'G' keys */
-+ if((currentkeys & G15_KEY_G1) && !(lastkeys & G15_KEY_G1))
-+ keydown(GKEY_OFFSET);
-+ else if(!(currentkeys & G15_KEY_G1) && (lastkeys & G15_KEY_G1))
-+ keyup(GKEY_OFFSET);
-+
-+ if((currentkeys & G15_KEY_G2) && !(lastkeys & G15_KEY_G2))
-+ keydown(GKEY_OFFSET+1);
-+ else if(!(currentkeys & G15_KEY_G2) && (lastkeys & G15_KEY_G2))
-+ keyup(GKEY_OFFSET+1);
-+
-+ if((currentkeys & G15_KEY_G3) && !(lastkeys & G15_KEY_G3))
-+ keydown(GKEY_OFFSET+2);
-+ else if(!(currentkeys & G15_KEY_G3) && (lastkeys & G15_KEY_G3))
-+ keyup(GKEY_OFFSET+2);
-+
-+ if((currentkeys & G15_KEY_G4) && !(lastkeys & G15_KEY_G4))
-+ keydown(GKEY_OFFSET+3);
-+ else if(!(currentkeys & G15_KEY_G4) && (lastkeys & G15_KEY_G4))
-+ keyup(GKEY_OFFSET+3);
-+
-+ if((currentkeys & G15_KEY_G5) && !(lastkeys & G15_KEY_G5))
-+ keydown(GKEY_OFFSET+4);
-+ else if(!(currentkeys & G15_KEY_G5) && (lastkeys & G15_KEY_G5))
-+ keyup(GKEY_OFFSET+4);
-+
-+ if((currentkeys & G15_KEY_G6) && !(lastkeys & G15_KEY_G6))
-+ keydown(GKEY_OFFSET+5);
-+ else if(!(currentkeys & G15_KEY_G6) && (lastkeys & G15_KEY_G6))
-+ keyup(GKEY_OFFSET+5);
-+
-+ if((currentkeys & G15_KEY_G7) && !(lastkeys & G15_KEY_G7))
-+ keydown(GKEY_OFFSET+6);
-+ else if(!(currentkeys & G15_KEY_G7) && (lastkeys & G15_KEY_G7))
-+ keyup(GKEY_OFFSET+6);
-+
-+ if((currentkeys & G15_KEY_G8) && !(lastkeys & G15_KEY_G8))
-+ keydown(GKEY_OFFSET+7);
-+ else if(!(currentkeys & G15_KEY_G8) && (lastkeys & G15_KEY_G8))
-+ keyup(GKEY_OFFSET+7);
-+
-+ if((currentkeys & G15_KEY_G9) && !(lastkeys & G15_KEY_G9))
-+ keydown(GKEY_OFFSET+8);
-+ else if(!(currentkeys & G15_KEY_G9) && (lastkeys & G15_KEY_G9))
-+ keyup(GKEY_OFFSET+8);
-+
-+ if((currentkeys & G15_KEY_G10) && !(lastkeys & G15_KEY_G10))
-+ keydown(GKEY_OFFSET+9);
-+ else if(!(currentkeys & G15_KEY_G10) && (lastkeys & G15_KEY_G10))
-+ keyup(GKEY_OFFSET+9);
-+
-+ if((currentkeys & G15_KEY_G11) && !(lastkeys & G15_KEY_G11))
-+ keydown(GKEY_OFFSET+10);
-+ else if(!(currentkeys & G15_KEY_G11) && (lastkeys & G15_KEY_G11))
-+ keyup(GKEY_OFFSET+10);
-+
-+ if((currentkeys & G15_KEY_G12) && !(lastkeys & G15_KEY_G12))
-+ keydown(GKEY_OFFSET+11);
-+ else if(!(currentkeys & G15_KEY_G12) && (lastkeys & G15_KEY_G12))
-+ keyup(GKEY_OFFSET+11);
-+
-+ if((currentkeys & G15_KEY_G13) && !(lastkeys & G15_KEY_G13))
-+ keydown(GKEY_OFFSET+12);
-+ else if(!(currentkeys & G15_KEY_G13) && (lastkeys & G15_KEY_G13))
-+ keyup(GKEY_OFFSET+12);
-+
-+ if((currentkeys & G15_KEY_G14) && !(lastkeys & G15_KEY_G14))
-+ keydown(GKEY_OFFSET+13);
-+ else if(!(currentkeys & G15_KEY_G14) && (lastkeys & G15_KEY_G14))
-+ keyup(GKEY_OFFSET+13);
-+
-+ if((currentkeys & G15_KEY_G15) && !(lastkeys & G15_KEY_G15))
-+ keydown(GKEY_OFFSET+14);
-+ else if(!(currentkeys & G15_KEY_G15) && (lastkeys & G15_KEY_G15))
-+ keyup(GKEY_OFFSET+14);
-+
-+ if((currentkeys & G15_KEY_G16) && !(lastkeys & G15_KEY_G16))
-+ keydown(GKEY_OFFSET+15);
-+ else if(!(currentkeys & G15_KEY_G16) && (lastkeys & G15_KEY_G16))
-+ keyup(GKEY_OFFSET+15);
-+
-+ if((currentkeys & G15_KEY_G17) && !(lastkeys & G15_KEY_G17))
-+ keydown(GKEY_OFFSET+16);
-+ else if(!(currentkeys & G15_KEY_G17) && (lastkeys & G15_KEY_G17))
-+ keyup(GKEY_OFFSET+16);
-+
-+ if((currentkeys & G15_KEY_G18) && !(lastkeys & G15_KEY_G18))
-+ keydown(GKEY_OFFSET+17);
-+ else if(!(currentkeys & G15_KEY_G18) && (lastkeys & G15_KEY_G18))
-+ keyup(GKEY_OFFSET+17);
-+
-+ /* 'M' keys */
-+
-+ if((currentkeys & G15_KEY_M1) && !(lastkeys & G15_KEY_M1))
-+ keydown(MKEY_OFFSET);
-+ else if(!(currentkeys & G15_KEY_M1) && (lastkeys & G15_KEY_M1))
-+ keyup(MKEY_OFFSET);
-+
-+ if((currentkeys & G15_KEY_M2) && !(lastkeys & G15_KEY_M2))
-+ keydown(MKEY_OFFSET+1);
-+ else if(!(currentkeys & G15_KEY_M2) && (lastkeys & G15_KEY_M2))
-+ keyup(MKEY_OFFSET+1);
-+
-+ if((currentkeys & G15_KEY_M3) && !(lastkeys & G15_KEY_M3))
-+ keydown(MKEY_OFFSET+2);
-+ else if(!(currentkeys & G15_KEY_M3) && (lastkeys & G15_KEY_M3))
-+ keyup(MKEY_OFFSET+2);
-+
-+ if((currentkeys & G15_KEY_MR) && !(lastkeys & G15_KEY_MR))
-+ keydown(MKEY_OFFSET+3);
-+ else if(!(currentkeys & G15_KEY_MR) && (lastkeys & G15_KEY_MR))
-+ keyup(MKEY_OFFSET+3);
-+
-+ if(map_Lkeys){
-+ /* 'L' keys... */
-+ if((currentkeys & G15_KEY_L1) && !(lastkeys & G15_KEY_L1))
-+ keydown(LKEY_OFFSET);
-+ else if(!(currentkeys & G15_KEY_L1) && (lastkeys & G15_KEY_L1))
-+ keyup(LKEY_OFFSET);
-+
-+ if((currentkeys & G15_KEY_L2) && !(lastkeys & G15_KEY_L2))
-+ keydown(LKEY_OFFSET+1);
-+ else if(!(currentkeys & G15_KEY_L2) && (lastkeys & G15_KEY_L2))
-+ keyup(LKEY_OFFSET+1);
-+
-+ if((currentkeys & G15_KEY_L3) && !(lastkeys & G15_KEY_L3))
-+ keydown(LKEY_OFFSET+2);
-+ else if(!(currentkeys & G15_KEY_L3) && (lastkeys & G15_KEY_L3))
-+ keyup(LKEY_OFFSET+2);
-+
-+ if((currentkeys & G15_KEY_L4) && !(lastkeys & G15_KEY_L4))
-+ keydown(LKEY_OFFSET+3);
-+ else if(!(currentkeys & G15_KEY_L4) && (lastkeys & G15_KEY_L4))
-+ keyup(LKEY_OFFSET+3);
-+
-+ if((currentkeys & G15_KEY_L5) && !(lastkeys & G15_KEY_L5))
-+ keydown(LKEY_OFFSET+4);
-+ else if(!(currentkeys & G15_KEY_L5) && (lastkeys & G15_KEY_L5))
-+ keyup(LKEY_OFFSET+4);
-+ }
- }
-+ else
-+ {
-+ // G15_KEY_LIGHT - Key modifier for Logitech G510 Media Keys implementation
-+
-+ // XF86AudioPlay
-+ if((currentkeys & G15_KEY_G1) && !(lastkeys & G15_KEY_G1))
-+ keydown(KEY_PLAYPAUSE);
-+ else if(!(currentkeys & G15_KEY_G1) && (lastkeys & G15_KEY_G1))
-+ keyup(KEY_PLAYPAUSE);
-+
-+ // XF86AudioStop
-+ if((currentkeys & G15_KEY_G2) && !(lastkeys & G15_KEY_G2))
-+ keydown(KEY_STOPCD);
-+ else if(!(currentkeys & G15_KEY_G2) && (lastkeys & G15_KEY_G2))
-+ keyup(KEY_STOPCD);
-+
-+ // XF86AudioPrev
-+ if((currentkeys & G15_KEY_G3) && !(lastkeys & G15_KEY_G3))
-+ keydown(KEY_PREVIOUSSONG);
-+ else if(!(currentkeys & G15_KEY_G3) && (lastkeys & G15_KEY_G3))
-+ keyup(KEY_PREVIOUSSONG);
-+
-+ // XF86AudioNext
-+ if((currentkeys & G15_KEY_G4) && !(lastkeys & G15_KEY_G4))
-+ keydown(KEY_NEXTSONG);
-+ else if(!(currentkeys & G15_KEY_G4) && (lastkeys & G15_KEY_G4))
-+ keyup(KEY_NEXTSONG);
-+
-+ // XF86AudioMute
-+ if((currentkeys & G15_KEY_G5) && !(lastkeys & G15_KEY_G5))
-+ keydown(KEY_MUTE);
-+ else if(!(currentkeys & G15_KEY_G5) && (lastkeys & G15_KEY_G5))
-+ keyup(KEY_MUTE);
-+
-+ // XF86AudioRaiseVolume
-+ if((currentkeys & G15_KEY_G6) && !(lastkeys & G15_KEY_G6))
-+ keydown(KEY_VOLUMEUP);
-+ else if(!(currentkeys & G15_KEY_G6) && (lastkeys & G15_KEY_G6))
-+ keyup(KEY_VOLUMEUP);
-+
-+ // XF86AudioLowerVolume
-+ if((currentkeys & G15_KEY_G7) && !(lastkeys & G15_KEY_G7))
-+ keydown(KEY_VOLUMEDOWN);
-+ else if(!(currentkeys & G15_KEY_G7) && (lastkeys & G15_KEY_G7))
-+ keyup(KEY_VOLUMEDOWN);
-+ }
- }
-
-
diff --git a/app-misc/g15daemon/files/g15daemon-1.9.5.3-overflow-fix.patch b/app-misc/g15daemon/files/g15daemon-1.9.5.3-overflow-fix.patch
index 71cbf914d839..07bb68601d76 100644
--- a/app-misc/g15daemon/files/g15daemon-1.9.5.3-overflow-fix.patch
+++ b/app-misc/g15daemon/files/g15daemon-1.9.5.3-overflow-fix.patch
@@ -1,5 +1,5 @@
---- ./g15daemon-1.9.5.3/libg15daemon_client/g15daemon_net.c 2008-01-25 05:45:05.000000000 +0100
-+++ ./g15daemon-1.9.5.3/libg15daemon_client/g15daemon_net.c 2011-02-14 22:51:55.203009264 +0100
+--- g15daemon-1.9.5.3/libg15daemon_client/g15daemon_net.c
++++ g15daemon-1.9.5.3/libg15daemon_client/g15daemon_net.c
@@ -217,7 +217,7 @@
if(poll(pfd,1,100)>0){
if(pfd[0].revents & POLLPRI && !(pfd[0].revents & POLLERR || pfd[0].revents & POLLHUP || pfd[0].revents & POLLNVAL)) {
diff --git a/app-misc/g15daemon/files/g15daemon.service b/app-misc/g15daemon/files/g15daemon.service
new file mode 100644
index 000000000000..668b8ba13a86
--- /dev/null
+++ b/app-misc/g15daemon/files/g15daemon.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Logitech G15 extra-key and LCD manager
+
+[Service]
+Type=forking
+PIDFile=/run/g15daemon.pid
+ExecStart=/usr/sbin/g15daemon
+ExecStop=/usr/sbin/g15daemon -k
+
+[Install]
+WantedBy=multi-user.target