Commit a60b7c63 authored by Giacomo Catenazzi's avatar Giacomo Catenazzi

Import Upstream version 1.9.0

parents
Mike Lampard <mlampard@users.sf.net>
- primary developer
Sven Ludwig
- Python bindings
James Green
- Documentaion updates
Anthony J. Mirabella
- numerous miscellaneous fixes and improvements to just about everything.
This diff is collapsed.
/*
This file is part of g15daemon.
g15daemon is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
g15daemon is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
(c) 2006 Mike Lampard, Philip Lawatsch, and others
$Revision: 214 $ - $Date: 2006-12-25 13:08:09 +1030 (Mon, 25 Dec 2006) $ $Author: aneurysm9 $
This daemon listens on localhost port 15550 for client connections,
and arbitrates LCD display. Allows for multiple simultaneous clients.
Client screens can be cycled through by pressing the 'L1' key.
*/
Version 1.0-pre0
- Initial release
1.1 21/07/2006
- Add WBMP support and Perl bindings.
1.2 31/07/2006
** IMPORTANT NOTE **
This release has changed the LCD screen switch function to the MR key to
allow clients use of all 'L' keys.
**
- reduce per-thread stack usage - default was 8Mb on i386 linux. now 256k
this makes top output look much nicer ;)
- optimize lcd buffer path, removing a conversion step. and reducing the
buffer size from 7k to 1k
- misc other memory optimisations.
- added python bindings (thanks muhgatus)
- added ability for lcd clients to receive L G & M key keypresses directly
- moved lcd display/client switch from L1 to MR
- MR key is now backlit when clients are attached.
- Added ability for lcd clients to change backlight brightness
- Added ability for lcd clients to toggle M-key LEDs
- Added libG15Render client support.
- Added ability for hidden lcd clients to bring themselves to the foreground
- clients change only their own backlight/mkey led status
1.2.1 06/08/2006
- Fix bug which could cause client screens to be lost under certain circumstances.
1.2.2 28/10/2006
- Vastly improve latency issues when using 'G' keys
- Documentation updates
- includes xkb patch for xorg 7.1 for native g15 keyboard layout in X11 (contrib directory)
1.2.3 30/10/2006
- improved the Xmodmaprc configuration, it now has parity with the xkb version
1.2.4 01/11/2006
- Users can now choose to use the L1 key to switch between client screens instead of MR.
- L1 is the small round black button directly below the LCD.
- Use -s on the commandline to activate the change.
1.2.5 05/11/2006
- Add ability for clients to request all M and G keypresses be 'pushed' to them,
rather than having to request them repeatedly. If a client uses this
option, no keyboard processing is done by the daemon, and the client must
be prepared to do uinput processing itself, if necessary. This limitation
may be removed in future versions of the API. Normal processing will
resume when the client that requested this feature exits or closes its
connection.
- Add manpage for the daemon.
- Fix automake bug that caused documentation not to be installed by default.
- Fix the daemons cmdline processing to handle more than one commandline option.
- Refactored the code slightly to allow for easier modification in the future.
- Handle long commandline arguments such as --help --version --kill --switch.
- Greatly improve error reporting.
- Add client development documentation (man g15daemon_client_devel / README.client_devel)
- Added a 'debug' mode (-d or --debug) cmdline switch to keep the daemon in the foreground
rather than daemonising. All errors and other info will be reported to STDERR in this mode.
- If compiled with libg15 1.1.0 or greater (or svn versions later than 3/11/06), the daemon
will now reset the keyboard to defaults on exit.
- make distcheck && make dist now work as expected.
- libg15daemon_client is now slightly more useful
- debian packaging now installs manpages
1.2.5svn -> current
- Add compiletime check for uinput version, should resolve compilation problems on some distro's
- Security improved - the daemon now sets its effective uid to nobody as soon as possible.
1.9.0SVN
- Add plugin API
- partially rewritten event core
- updated g15daemon_xmms_spectrum plugin with new features, now enabled via configure --enable-xmmsplugin
xmms devel and glib devel packages will need to be installed prior to attempting ./configure --enable-xmmsplugin
Plugin is not compiled by default.
- Clock is now a plugin
- dependency on libdaemon is now removed
- g15daemon is now dependant on libg15render.
- Clock now includes analog clock thanks to Rasta Freak <igor.jusic@zg.t-com.hr>
- Moved g15daemon_xmms_spectrum plugin to separate package
G15daemon Client Development() G15daemon Client Development()
SYNOPSIS
#include <libg15.h>
#include <g15daemon_client.h>
link with
-lg15daemon_client
int new_g15_screen(int screentype);
int g15_close_screen(int sock);
int g15_send(int sock, char *buf, unsigned int len);
int g15_recv(int sock, char *buf, unsigned int len);
G15Daemon Server / Client communication
G15Daemon uses INET sockets to talk to its clients, listening on local-
host port 15550 for connection requests. Once connected, the server
sends the text string "G15 daemon HELLO" to confirm to the client that
it is a valid g15daemon process, creates a new screen, and waits for
LCD buffers or commands to be sent from the client. Clients are able
to create multiple screens simply by opening more socket connections to
the server process. If the socket is closed or the client exits, all
LCD buffers and the screen associated with that socket are automati-
cally destroyed.
Clients wishing to display on the LCD must send entire screens in the
format of their choice. Currently partial screen updates (icons etc)
are not supported.
G15Daemon commands are sent to the daemon via the OOB (out-of-band)
messagetype, replies are sent inband back to the client.
int new_g15_screen(int screentype)
Opens a new connection and returns a network socket for use. Creates a
screen with one of the following pixel formats defined in g15dae-
mon_client.h:
G15_PIXELBUF: this buffer must be exactly 6880 bytes, and uses 1 byte
per pixel.
G15_TEXTBUF: currently ignored by the daemon.
G15_WBMPBUF: this is a packed pixel buffer in WBMP format with 8 pix-
els per byte. Useful for perl programmers using the GD:: and G15Dae-
mon.pm (see lang_bindings directory) perl modules.
G15_G15RBUF: another packed pixel buffer type, also with 8 pix-
els/byte, and is the native libg15render format.
Example of use:
int screen_fd = new_g15_screen( G15_WBMPBUF );
int g15_close_screen (int screen_fd)
Simply closes a socket previously opened with new_g15_screen(). The
daemon will automatically clean up any buffers and remove the LCD
screen from the display list.
Returns 0 if successful, or errno if there was an error.
Example:
int retval = 0; int screen_fd = new_g15_screen( G15_WBMPBUF );
retval = g15_close_screen( screen_fd );
int g15_send (int sock, char *buf, unsigned int len)
A simple wrapper around send() to ensure that all 'len' bytes of data
is sent to the daemon. It simply uses poll() to block until the entire
message is sent.
Returns 0 on success, -1 if the send failed due to timeout or socket
error.
int g15_recv (int sock, char *buf, unsigned int len)
A simple wrapper around recv() to ensure that all 'len' bytes of data
are received from the daemon. It simply uses poll() to block until the
entire message is received.
Returns 0 on success, -1 if the recv failed due to timeout or socket
error.
G15Daemon Command Types
Commands and requests to the daemon are sent via OOB data packets.
Changes to the backlight and mkey state will only affect the calling
client. The following commands are supported as defined in g15dae-
mon_client.h:
G15DAEMON_KEY_HANDLER
Requests that all M and G key presses are sent to this client.
All keys are packed into an unsigned int, and sent to the client
inband when a key is pressed.
G15DAEMON_MKEYLEDS
Sets the M key LED state. In order to change LED state, each
LED that is to be turned on is OR'd with the command byte. See
libg15.h for values. For examples see the end of this document.
G15DAEMON_BACKLIGHT
Sets the LCD Backlight brightness. Brightness level (0|1|2) is
OR'd with the command byte. For examples see the end of this
document.
G15DAEMON_CONTRAST
Sets the LCD contrast. Contrast level (0|1|2) is OR'd with the
command byte. For examples see the end of this document.
G15DAEMON_GET_KEYSTATE
Requests a packet containing the current keystate. The daemon
will return an unsigned int containing any keys pressed. See
libg15.h for details on key values, and lcdclient_test.c in the
source distribution for an example.
G15DAEMON_SWITCH_PRIORITIES
Toggles the client's LCD screen to/from the front. Clients can
check their foreground/background state with the following:
G15DAEMON_IS_FOREGROUND
On reciept of this command, G15Daemon will send a 1 byte packet
back with the value 1 if the client is foreground, or 0 if not.
G15DAEMON_IS_USER_SELECTED
On reciept of this command, G15daemon will return a byte indi-
cating if the user selected the client be foreground or back-
ground.
EXAMPLES
Below is a completely nonsensical client which demonstrates most of the
commands.
--- Cut here ---
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <errno.h>
#include <poll.h>
#include <g15daemon_client.h>
#include <libg15.h>
int main(int argc, char *argv[]) {
int g15screen_fd, retval;
char lcdbuffer[6880];
unsigned int keystate;
char msgbuf[256];
if((g15screen_fd = new_g15_screen(G15_PIXELBUF))<0){
printf("Sorry, cant connect to the G15daemon0);
return -1;
}else
printf("Connected to g15daemon. sending image\n"); /*
create a half black image */
memset(lcdbuffer,0,6880);
memset(lcdbuffer,1,6880/2);
/* send the image to the daemon */
retval = g15_send(g15screen_fd,(char*)lcdbuffer,6880);
printf("checking key status - press G1 to exit0,retval);
while(1){
keystate = 0;
memset(msgbuf,0,256); /* request key status
*/
if(send(g15screen_fd, G15DAEMON_GET_KEYSTATE, 1,
MSG_OOB)<1)
printf("Error in send0);
retval = recv(g15screen_fd, &keystate ,
sizeof(keystate),0);
if(keystate)
printf("keystate = %i0,keystate);
/* quit if G1 is pressed */
if(keystate & G15_KEY_G1 ) /* See libg15.h for details on
key values. */
break;
memset(msgbuf,0,5);
/* G2,G3 & G4 change LCD backlight */
if(keystate & G15_KEY_G2 ){
msgbuf[0]=G15_BRIGHTNESS_DARK|G15DAEMON_BACKLIGHT;
send(g15screen_fd,msgbuf,1,MSG_OOB);
}
if(keystate & G15_KEY_G3 ){
msgbuf[0]=G15_BRIGHTNESS_MEDIUM|G15DAEMON_BACKLIGHT;
send(g15screen_fd,msgbuf,1,MSG_OOB);
}
if(keystate & G15_KEY_G4 ){
msgbuf[0]=G15_BRIGHTNESS_BRIGHT|G15DAEMON_BACKLIGHT;
send(g15screen_fd,msgbuf,1,MSG_OOB);
}
msgbuf[0]=G15DAEMON_IS_FOREGROUND; /* are we viewable? */
send(g15screen_fd,msgbuf,1,MSG_OOB);
recv(g15screen_fd,msgbuf,1,0);
if(msgbuf[0])
printf("Hey, we are in the foreground, Doc0);
else
printf("What dastardly wabbit put me in the back-
ground?0);
if(msgbuf[0]){ /* we've been backgrounded! */
sleep(2); /* remain in the background for a bit */
msgbuf[0] = G15DAEMON_SWITCH_PRIORITIES; /* switch pri-
orities */
send(g15screen_fd,msgbuf,1,MSG_OOB);
sleep(2);
send(g15screen_fd,msgbuf,1,MSG_OOB);
}
usleep(5000);
}
g15_close_screen(g15screen_fd);
return 0; }
-- end cutting --
G15Daemon 1.0 G15daemon Client Development()
.TH "G15Daemon" "1" "1.3" "G15tools - G15Daemon" "1"
.SH "NAME"
g15daemon \- provides access to extra keys and the LCD available on the logitech G15 keyboard.
.SH "DESCRIPTION"
G15Daemon allows users access to all extra keys by decoding them and pushing them back into the kernel via the linux UINPUT driver. This driver must be loaded before g15daemon can be used for keyboard access.
The G15 LCD is also supported. By default, with no other clients active, g15daemon will display a clock. Client applications and scripts can access the LCD via a simple API.
.SH "OPTIONS"
The current version of G15Daemon understands the following options:
.br
.P
.HP
\-v Show version info.
.P
.HP
\-s By default, g15daemon uses the MR key to switch between client screens. Using this switch on the cmdline alters this, making L1 (the small, round, black button below the LCD) the button to achieve this function.
.P
.HP
\-k Stop a previously running copy of G15Daemon. For the keys and LCD to work, you'll have to restart the daemon manually.
.P
.HP
\-h Show a brief summary of commandline options available.
.SH "BASIC USAGE"
G15Daemon must be run as the root user, either from a startup script (sample scripts are available in the contrib folder) or manually, via the su command.
To run the daemon with default options, run:
g15daemon
or
g15daemon \-s
to have the L1 key as the client screen switch.
If all required libraries are installed and in locations known to your operating system, the daemon will slip quietly into the background and a clock will appear on the LCD.
Congratulations! The linux kernel will now output keycodes for all your extra keys.
.SH "Using the keys in X11"
Current versions of the Xorg Xserver dont have support for the extra keys that g15daemon provides. This support will be available in the next release of Xorg (7.2).
For now, if you want access to the extra keys for hotkey support in X11, you need to run the xmodmaprc script on each start of X. This script is available in the contrib folder (if g15daemon is installed in the default location, the contrib folder is in /usr/share/doc/g15daemon\-${VERSION}/contrib
Depending on your linux distribution, copying the xmodmaprc file (or pasting the text below) into ~/.Xmodmap may be all that's required.
.SH "Xmodmaprc file"
Copy the following into ~/.Xmodmap (depending on your distribution) for X11 to recognise all extra G15 keys:
\-\- cut here \-\-
.br
keycode 93 = XF86Launch1
.br
keycode 129 = XF86Launch8
.br
keycode 130 = XF86Launch9
.br
keycode 131 = XF86Launch2
.br
keycode 132 = XF86Phone
.br
keycode 133 = XF86Messenger
.br
keycode 136 = XF86LaunchD
.br
keycode 137 = XF86Support
.br
keycode 138 = XF86Word
.br
keycode 143 = XF86LaunchF
.br
keycode 144 = XF86AudioPrev
.br
keycode 150 = XF86LogOff
.br
keycode 152 = XF86Launch5
.br
keycode 153 = XF86AudioNext
.br
keycode 160 = XF86AudioMute
.br
keycode 161 = XF86Travel
.br
keycode 162 = XF86AudioPlay
.br
keycode 163 = XF86Spell
.br
keycode 164 = XF86AudioStop
.br
keycode 170 = XF86VendorHome
.br
keycode 174 = XF86AudioLowerVolume
.br
keycode 176 = XF86AudioRaiseVolume
.br
keycode 177 = XF86Launch4
.br
keycode 178 = XF86HomePage
.br
keycode 182 = XF86Away
.br
keycode 183 = XF86WebCam
.br
keycode 184 = XF86Launch0
.br
keycode 188 = XF86Music
.br
keycode 190 = XF86Launch6
.br
keycode 194 = XF86Forward
.br
keycode 195 = XF86Send
.br
keycode 205 = XF86Calendar
.br
keycode 208 = XF86Launch7
.br
keycode 209 = XF86LaunchB
.br
keycode 210 = XF86LaunchC
.br
keycode 215 = XF86Save
.br
keycode 219 = XF86WWW
.br
keycode 220 = XF86LaunchE
.br
keycode 223 = XF86Sleep
.br
keycode 228 = XF86Pictures
.br
keycode 231 = XF86LaunchA
.br
keycode 236 = XF86Mail
.br
keycode 237 = XF86AudioMedia
.br
keycode 246 = XF86iTouch
.br
keycode 247 = XF86Launch3
.br
keycode 249 = XF86ToDoList
.br
keycode 251 = XF86Calculater
.br
\-\- end cutting \-\-
.SH "AUTHORS"
The latest release of g15daemon is available at
.P
http://g15daemon.sourceforge.net
.P
G15daemon was written by Mike Lampard mlampard@users.sourceforge.net and uses the libg15 library by Philip Lawatsch and Anthony J. Mirabella of the g15tools project. (g15tools.sourceforge.net)
.P
The Python bindings for libg15daemon_client were written by Sven Ludwig.
.P
Many thanks to everyone who has assisted in reporting bugs, misfeatures and made feature requests.
An up to date list of all authors is available in the AUTHORS file distributed in the source.
.SH "LICENSE"
G15daemon, libg15daemon_client and other sourcecode in this package are licensed under the GPL (General Public License), version 2 or later. Details on this license are available in the LICENSE document in the root directory of the source package, and at http://www.fsf.org
.TH "G15daemon Client Development" "" "1.0" "G15Daemon" ""
.SH "SYNOPSIS"
#include <libg15.h>
.br
#include <g15daemon_client.h>
link with
\-lg15daemon_client
int new_g15_screen(int screentype);
.br
int g15_close_screen(int sock);
.br
int g15_send(int sock, char *buf, unsigned int len);
.br
int g15_recv(int sock, char *buf, unsigned int len);
.br
int g15_send_cmd (int sock, unsigned char command, unsigned char value);
.br
.SH "G15Daemon Server / Client communication"
G15Daemon uses INET sockets to talk to its clients, listening on localhost port 15550 for connection requests. Once connected, the server sends the text string "G15 daemon HELLO" to confirm to the client that it is a valid g15daemon process, creates a new screen, and waits for LCD buffers or commands to be sent from the client. Clients are able to create multiple screens simply by opening more socket connections to the server process. If the socket is closed or the client exits, all LCD buffers and the screen associated with that socket are automatically destroyed.
Clients wishing to display on the LCD must send entire screens in the format of their choice. Currently partial screen updates (icons etc) are not supported.
G15Daemon commands are sent to the daemon via the OOB (out\-of\-band) messagetype, replies are sent inband back to the client.
.SH "int new_g15_screen(int screentype)"
Opens a new connection and returns a network socket for use. Creates a screen with one of the following pixel formats defined in g15daemon_client.h:
G15_PIXELBUF: this buffer must be exactly 6880 bytes, and uses 1 byte per pixel.
G15_TEXTBUF: currently ignored by the daemon.
G15_WBMPBUF: this is a packed pixel buffer in WBMP format with 8 pixels per byte. Useful for perl programmers using the GD:: and G15Daemon.pm (see lang_bindings directory) perl modules.
G15_G15RBUF: another packed pixel buffer type, also with 8 pixels/byte, and is the native libg15render format.
Example of use:
int screen_fd = new_g15_screen( G15_WBMPBUF );
.SH "int g15_close_screen (int screen_fd)"
Simply closes a socket previously opened with new_g15_screen(). The daemon will automatically clean up any buffers and remove the LCD screen from the display list.
Returns 0 if successful, or errno if there was an error.
Example:
int retval = 0;
int screen_fd = new_g15_screen( G15_WBMPBUF );
... do processing and display here ...
retval = g15_close_screen( screen_fd );
.SH "int g15_send (int sock, char *buf, unsigned int len)"
A simple wrapper around send() to ensure that all 'len' bytes of data is sent to the daemon. It simply uses poll() to block until the entire message is sent.
Returns 0 on success, \-1 if the send failed due to timeout or socket error.
.SH "int g15_recv (int sock, char *buf, unsigned int len)"
A simple wrapper around recv() to ensure that all 'len' bytes of data are received from the daemon. It simply uses poll() to block until the entire message is received.
Returns 0 on success, \-1 if the recv failed due to timeout or socket error.
.SH "int g15_send_cmd ( int sock, unsigned char command, unsigned char value)"
Sends a command to the daemon (possible commands are listed below). Returns 0 or the return value of the command on success, \-1 on failure.
See examples for usage.
.SH "G15Daemon Command Types"
.P
Commands and requests to the daemon are sent via OOB data packets. Changes to the backlight and mkey state will only affect the calling client. The following commands are supported as defined in g15daemon_client.h:
.IP "G15DAEMON_KEY_HANDLER"
Requests that all M and G key presses are sent to this client. All keys are packed into an unsigned int, and sent to the client inband when a key is pressed.
.IP "G15DAEMON_MKEYLEDS"
Sets the M key LED state. In order to change LED state, each LED that is to be turned on is OR'd with the command byte. See libg15.h for values. For examples see the end of this document.
.IP "G15DAEMON_BACKLIGHT"
Sets the LCD Backlight brightness. Brightness level (0|1|2) is OR'd with the command byte. For examples see the end of this document.
.IP "G15DAEMON_CONTRAST"
Sets the LCD contrast. Contrast level (0|1|2) is OR'd with the command byte. For examples see the end of this document.
.IP "G15DAEMON_GET_KEYSTATE"
Requests a packet containing the current keystate. The daemon will return an unsigned int containing any keys pressed. See libg15.h for details on key values, and lcdclient_test.c in the source distribution for an example.
.IP "G15DAEMON_SWITCH_PRIORITIES"
Toggles the client's LCD screen to/from the front. Clients can check their foreground/background state with the following:
.IP "G15DAEMON_IS_FOREGROUND"
On reciept of this command, G15Daemon will send a 1 byte packet back with the value 1 if the client is foreground, or 0 if not.
.IP "G15DAEMON_IS_USER_SELECTED"
On reciept of this command, G15daemon will return a byte indicating if the user selected the client be foreground or background.
.SH "EXAMPLES"
Below is a completely nonsensical client which (poorly) demonstrates the usage of most of the commands.
\-\-\- Cut here \-\-\-
.P
#include <stdio.h>
.br
#include <stdlib.h>
.br
#include <string.h>
.br
#include <sys/types.h>
.br
#include <sys/socket.h>
.br
#include <errno.h>
.br
#include <poll.h>
.br
#include <g15daemon_client.h>
.br
#include <libg15.h>
.br
.P
/* #define TEST_KEYHANDLER */
int main(int argc, char *argv[])
{
int g15screen_fd, retval;
char lcdbuffer[6880];
unsigned int keystate;
char msgbuf[256];
int foo = 0;
if((g15screen_fd = new_g15_screen(G15_PIXELBUF))<0){
printf("Sorry, cant connect to the G15daemon\n");
return 5;
}else
printf("Connected to g15daemon. sending image\n");
if(argc<2)
retval = g15_send(g15screen_fd,(char*)logo_data,6880);
else {
memset(lcdbuffer,0,6880);
memset(lcdbuffer,1,6880/2);
retval = g15_send(g15screen_fd,(char*)lcdbuffer,6880);
}
printf("checking key status \- press G1 to exit\n",retval);
while(1){
keystate = 0;
int foo;
keystate = g15_send_cmd (g15screen_fd, G15DAEMON_GET_KEYSTATE, foo);
if(keystate)
printf("keystate = %i\n",keystate);
if(keystate & G15_KEY_G1) //G1 key. See libg15.h for details on key values.
break;
/* G2,G3 & G4 change LCD backlight */
if(keystate & G15_KEY_G2){
retval = g15_send_cmd (g15screen_fd, G15DAEMON_BACKLIGHT, G15_BRIGHTNESS_DARK);
}
if(keystate & G15_KEY_G3){
retval = g15_send_cmd (g15screen_fd, G15DAEMON_BACKLIGHT, G15_BRIGHTNESS_MEDIUM);
}
if(keystate & G15_KEY_G4){
retval = g15_send_cmd (g15screen_fd, G15DAEMON_BACKLIGHT, G15_BRIGHTNESS_BRIGHT);
}
/* is this client in the foreground?? */
retval = g15_send_cmd (g15screen_fd, G15DAEMON_IS_FOREGROUND, foo);
if(retval)
printf("Hey, we are in the foreground, Doc\n");
else
printf("What dastardly wabbit put me in the background?\n");
retval = g15_send_cmd (g15screen_fd, G15DAEMON_IS_USER_SELECTED, foo);
if(retval)
printf("You wanted me in the foreground, right Doc?\n");
else
printf("You dastardly wabbit !\n");
if(retval){ /* we've been backgrounded! */
sleep(2); /* remain in the background for a bit */
retval = g15_send_cmd (g15screen_fd, G15DAEMON_SWITCH_PRIORITIES, foo);
sleep(2); /* switch to foreground */
retval = g15_send_cmd (g15screen_fd, G15DAEMON_SWITCH_PRIORITIES, foo);
}
usleep(500);
#ifdef TEST_KEYHANDLER
/* ok.. request that all G&M keys are passed to us.. */
retval = g15_send_cmd (g15screen_fd, G15DAEMON_KEY_HANDLER, foo);
while(1){
printf("waiting on keystate\n");
keystate=0;
retval = recv(g15screen_fd, &keystate , sizeof(keystate),0);
if(keystate)
printf("Recieved %i as keystate",keystate);
}
#endif
}
g15_close_screen(g15screen_fd);
return 0;
}
\-\- end cutting \-\-
This file contains some frequently asked questions and answers
regarding G15Daemon and it's installation.