diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-misc/g15daemon/files | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-misc/g15daemon/files')
-rw-r--r-- | app-misc/g15daemon/files/20g15daemon | 15 | ||||
-rw-r--r-- | app-misc/g15daemon/files/99-g15daemon.rules | 1 | ||||
-rw-r--r-- | app-misc/g15daemon/files/g15daemon-1.2.7.confd | 9 | ||||
-rw-r--r-- | app-misc/g15daemon/files/g15daemon-1.9.5.3-forgotten-open-mode.patch | 11 | ||||
-rw-r--r-- | app-misc/g15daemon/files/g15daemon-1.9.5.3-g510-keys.patch | 340 | ||||
-rw-r--r-- | app-misc/g15daemon/files/g15daemon-1.9.5.3-overflow-fix.patch | 11 | ||||
-rw-r--r-- | app-misc/g15daemon/files/g15daemon-1.9.5.3.initd | 46 | ||||
-rw-r--r-- | app-misc/g15daemon/files/g15daemon-hotplug | 15 | ||||
-rw-r--r-- | app-misc/g15daemon/files/g15daemon.conf | 27 |
9 files changed, 475 insertions, 0 deletions
diff --git a/app-misc/g15daemon/files/20g15daemon b/app-misc/g15daemon/files/20g15daemon new file mode 100644 index 000000000000..ee1422537f25 --- /dev/null +++ b/app-misc/g15daemon/files/20g15daemon @@ -0,0 +1,15 @@ +#!/bin/sh + +. "${PM_FUNCTIONS}" + +case "$1" in + hibernate|suspend) + /etc/init.d/g15daemon stop + ;; + thaw|resume) + /etc/init.d/g15daemon start + ;; + *) + exit $NA + ;; +esac diff --git a/app-misc/g15daemon/files/99-g15daemon.rules b/app-misc/g15daemon/files/99-g15daemon.rules new file mode 100644 index 000000000000..d491d683684f --- /dev/null +++ b/app-misc/g15daemon/files/99-g15daemon.rules @@ -0,0 +1 @@ +SUBSYSTEM=="usb", ATTR{product}=="G15 Gaming Keyboard", RUN+="/usr/bin/g15daemon-hotplug" diff --git a/app-misc/g15daemon/files/g15daemon-1.2.7.confd b/app-misc/g15daemon/files/g15daemon-1.2.7.confd new file mode 100644 index 000000000000..08ea97f49763 --- /dev/null +++ b/app-misc/g15daemon/files/g15daemon-1.2.7.confd @@ -0,0 +1,9 @@ +# /etc/conf.d/g15daemon: Configuration for the g15daemon + +# 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" + +# 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-forgotten-open-mode.patch b/app-misc/g15daemon/files/g15daemon-1.9.5.3-forgotten-open-mode.patch new file mode 100644 index 000000000000..b475f1d58d69 --- /dev/null +++ b/app-misc/g15daemon/files/g15daemon-1.9.5.3-forgotten-open-mode.patch @@ -0,0 +1,11 @@ +--- ./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 +@@ -356,7 +356,7 @@ + config_items_t * item=NULL; + char line[1024]; + +- config_fd = open(filename,O_CREAT|O_RDWR|O_TRUNC); ++ config_fd = open(filename,O_CREAT|O_RDWR|O_TRUNC,0664); + if(config_fd){ + snprintf(line,1024,"# G15Daemon Configuration File\n# any items entered before a [section] header\n# will be in the Global config space\n# comments you wish to keep should start with a semicolon';'\n"); + write(config_fd,line,strlen(line)); 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 new file mode 100644 index 000000000000..240f21c385aa --- /dev/null +++ b/app-misc/g15daemon/files/g15daemon-1.9.5.3-g510-keys.patch @@ -0,0 +1,340 @@ +From http://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 new file mode 100644 index 000000000000..71cbf914d839 --- /dev/null +++ b/app-misc/g15daemon/files/g15daemon-1.9.5.3-overflow-fix.patch @@ -0,0 +1,11 @@ +--- ./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 +@@ -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)) { + memset(packet,0,sizeof(packet)); +- msgret = recv(sock, packet, 10 , MSG_OOB); ++ msgret = recv(sock, packet, sizeof(packet), MSG_OOB); + if (msgret < 1) { + return -1; + } diff --git a/app-misc/g15daemon/files/g15daemon-1.9.5.3.initd b/app-misc/g15daemon/files/g15daemon-1.9.5.3.initd new file mode 100644 index 000000000000..4e7798c7fcfc --- /dev/null +++ b/app-misc/g15daemon/files/g15daemon-1.9.5.3.initd @@ -0,0 +1,46 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# Init script for g15daemon + +pidfile="/var/run/g15daemon.pid" +command="/usr/sbin/g15daemon" +start_stop_daemon_args="--wait 30" +command_args="" + +depend() { + after hotplug + after usb + after modules +} + +start_pre() { + # Does the input device already exist? + if [ -e "/proc/modules" ] ; then + if [ ! -e "/dev/input/uinput" ] && [ ! -e "/dev/uinput" ] ; then + # We can load modules, but uinput device does not exist + einfo "Loading uinput module" + /sbin/modprobe uinput > /dev/null 2> /dev/null \ + || return 1 + fi + fi + + if [ "${CLIENT_SWITCH_L1}" = "yes" ] ; then + command_args="--switch" + fi +} + +stop() { + ebegin "Stopping g15daemon" + local KILLOPT="-k" + if [ $BACKLIGHT_OFF = "yes" ]; then + KILLOPT="-K" + fi + while [ -f "${pidfile}" ] && kill -0 $(cat ${pidfile}) ; do + ${command} ${KILLOPT} + sleep 1 + done + eend $? +} diff --git a/app-misc/g15daemon/files/g15daemon-hotplug b/app-misc/g15daemon/files/g15daemon-hotplug new file mode 100644 index 000000000000..2ae8be0bde01 --- /dev/null +++ b/app-misc/g15daemon/files/g15daemon-hotplug @@ -0,0 +1,15 @@ +#!/bin/sh + +export IN_HOTPLUG=1 + +case "$ACTION" in + "add") + /etc/init.d/g15daemon --quiet restart + ;; + "remove") + /etc/init.d/g15daemon --quiet stop + ;; + *) + exit 0 + ;; +esac diff --git a/app-misc/g15daemon/files/g15daemon.conf b/app-misc/g15daemon/files/g15daemon.conf new file mode 100644 index 000000000000..2d2bfc3cabde --- /dev/null +++ b/app-misc/g15daemon/files/g15daemon.conf @@ -0,0 +1,27 @@ +# G15Daemon Configuration File +# any items entered before a [section] header +# will be in the Global config space +# comments you wish to keep should start with a semicolon';' + +[Global] +Use MR as Cycle Key: Off + +[PLUGIN_LOAD_ORDER] +0: g15plugin_uinput.so +1: g15plugin_clock.so +2: g15plugin_tcpserver.so +TotalPlugins: 3 + +[PLUGINS] +Linux UINPUT Keyboard Output: Load +Clock: Load +LCDServer: Load + +[Keyboard OS Mapping (uinput)] +device: /dev/input/uinput +Lkeys.mapped: 0 + +[Clock] +24hrFormat: On +ShowDate: Off +Digital: On |