Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1363e7ede4 | ||
|
|
9be03a7841 | ||
|
|
1525a75133 | ||
|
|
e34c9fcf1c | ||
|
|
c9a200ca8e | ||
|
|
b6a96a4dd3 | ||
|
|
c8d7f9138e | ||
|
|
be8ef5acb3 |
No files matched your search
@@ -37,113 +37,6 @@ to have the MR 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
|
||||
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
g15daemon (1.9.5.3-3) unstable; urgency=low
|
||||
|
||||
* The default key to switch application is changes:
|
||||
now we use L1 (round small key near the display, instead of MR key.
|
||||
This will allow other application to use MR (i.e. g15macro).
|
||||
|
||||
-- Giacomo Catenazzi <cate@debian.org> Mon, 28 Apr 2008 08:36:27 +0200
|
||||
|
||||
Vendored
+1
-1
@@ -4,7 +4,7 @@ g15daemon for Debian
|
||||
|
||||
Debian 'xkeyboard-config' package already have support for g15
|
||||
keyboards, so you don't need to exec 'xmodmap' as described on
|
||||
original documentations. Anywaym you should configure your
|
||||
original documentations. Anyway you should configure your
|
||||
xorg.conf file, so that xorg will understand the extra keys.
|
||||
|
||||
To have the full support of the extra keys, you should edit the
|
||||
|
||||
Vendored
+70
@@ -1,3 +1,73 @@
|
||||
g15daemon (1.9.5.3-8.2) unstable; urgency=low
|
||||
|
||||
* Non-maintainer upload.
|
||||
* Use ATTR instead of SYSFS in udev rules (closes: #573434).
|
||||
* Remove references to other libraries from dependency_libs field
|
||||
(closes: #629592).
|
||||
|
||||
-- Luk Claes <luk@debian.org> Tue, 31 May 2011 07:33:52 +0200
|
||||
|
||||
g15daemon (1.9.5.3-8.1) unstable; urgency=low
|
||||
|
||||
* Non-maintainer upload.
|
||||
* Send a sync event after key up/down (closes: #567213).
|
||||
|
||||
-- Julien Cristau <jcristau@debian.org> Sun, 25 Jul 2010 11:39:22 +0200
|
||||
|
||||
g15daemon (1.9.5.3-8) unstable; urgency=low
|
||||
|
||||
* Put the third argument (modes) on open with O_CREAT (Closes: #559649)
|
||||
* remove rpath
|
||||
|
||||
-- Giacomo Catenazzi <cate@debian.org> Fri, 18 Dec 2009 07:52:26 +0100
|
||||
|
||||
g15daemon (1.9.5.3-7) unstable; urgency=low
|
||||
|
||||
* Change priority of libg15daemon-client1 from extra to optional
|
||||
(mumble package needs it)
|
||||
|
||||
-- Giacomo Catenazzi <cate@debian.org> Tue, 01 Sep 2009 19:50:38 +0200
|
||||
|
||||
g15daemon (1.9.5.3-6) unstable; urgency=low
|
||||
|
||||
* Shared devices (lcd dispaly + audio) are not good handled
|
||||
by udev script. Adding workaround until improving
|
||||
programs to handle disconnections (Closes: #541780)
|
||||
* Add debugging flag (and code) for init.d and udev scripts
|
||||
* Change syslog facility: from user to daemon
|
||||
* better (and more secure) screenshort creation in /tmp
|
||||
|
||||
-- Giacomo Catenazzi <cate@debian.org> Wed, 19 Aug 2009 07:33:22 +0200
|
||||
|
||||
g15daemon (1.9.5.3-5) unstable; urgency=low
|
||||
|
||||
* Handle keyboard device with udev, so detecting detachement
|
||||
and attachment of keyboarda (Closes: #489978).
|
||||
* init.d LSB header: try to start before xorg, to be able
|
||||
to have full access to all extra keys.
|
||||
* Recent libg15 corrected strange behaviour in new G15 keyboard
|
||||
(Closes: #494180)
|
||||
|
||||
-- Giacomo Catenazzi <cate@debian.org> Thu, 13 Aug 2009 08:20:02 +0200
|
||||
|
||||
g15daemon (1.9.5.3-4) unstable; urgency=low
|
||||
|
||||
* Try to load uinput module, in order to have Gx key working
|
||||
(Closes: #475000).
|
||||
* Usual updates
|
||||
|
||||
-- Giacomo Catenazzi <cate@debian.org> Thu, 06 Aug 2009 08:32:33 +0200
|
||||
|
||||
g15daemon (1.9.5.3-3) unstable; urgency=low
|
||||
|
||||
* Changing default in /etc/default/g15daemon: Use L1 key instead of MR
|
||||
as actual upstream default and allowing to use g15macro
|
||||
(Closes: #478069)
|
||||
* Removed the X11 setup on man page, because it is not relevant
|
||||
to recent distributions and could confuse our users (Closes: #463078)
|
||||
|
||||
-- Giacomo Catenazzi <cate@debian.org> Mon, 28 Apr 2008 08:47:07 +0200
|
||||
|
||||
g15daemon (1.9.5.3-2) unstable; urgency=low
|
||||
|
||||
* Recommend xkb-data instead of keyboard-config. Adapted patch from
|
||||
|
||||
Vendored
+6
-5
@@ -2,15 +2,15 @@ Source: g15daemon
|
||||
Section: utils
|
||||
Priority: extra
|
||||
Maintainer: Giacomo Catenazzi <cate@debian.org>
|
||||
Build-Depends: cdbs, debhelper (>= 5), autotools-dev, automake1.9, libtool,
|
||||
Build-Depends: cdbs, debhelper (>= 5), autotools-dev, automake1.9, libtool, chrpath,
|
||||
libg15-dev, libg15render-dev (>=1.2.0.svn250-2), libusb-dev, libfreetype6-dev
|
||||
Standards-Version: 3.7.3
|
||||
Standards-Version: 3.8.2
|
||||
Homepage: http://www.g15tools.com/
|
||||
|
||||
Package: g15daemon
|
||||
Section: utils
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, libg15daemon-client1 (=${binary:Version})
|
||||
Depends: libg15daemon-client1 (=${binary:Version}), ${shlibs:Depends}, ${misc:Depends},
|
||||
Recommends: xkb-data ( >= 0.9+cvs.20070428-1)
|
||||
Description: Screen multiplexer for Logitech G15 Keyboard
|
||||
G15daemon provides multiple virtual screens for the LCD on the Logitech
|
||||
@@ -21,15 +21,16 @@ Description: Screen multiplexer for Logitech G15 Keyboard
|
||||
|
||||
Package: libg15daemon-client1
|
||||
Section: libs
|
||||
Priority: optional
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: Development packages for libg15daemon-client
|
||||
Includes the files needed for developing g15daemon clients
|
||||
|
||||
Package: libg15daemon-client-dev
|
||||
Section: libdevel
|
||||
Architecture: any
|
||||
Depends: libg15daemon-client1 (= ${binary:Version})
|
||||
Depends: libg15daemon-client1 (= ${binary:Version}), ${misc:Depends}
|
||||
Description: Development packages for libg15daemon-client
|
||||
Includes the files needed for developing g15daemon clients
|
||||
|
||||
Vendored
-1
@@ -1,4 +1,3 @@
|
||||
FAQ
|
||||
NEWS
|
||||
README
|
||||
TODO
|
||||
Vendored
+4
-1
@@ -6,7 +6,10 @@
|
||||
# SWITCH_KEY="L1 to use the L1 key: the small round key below the LCD
|
||||
|
||||
|
||||
SWITCH_KEY="MR"
|
||||
SWITCH_KEY="L1"
|
||||
|
||||
# Turn on debugging of g15 init.d and udev scripts
|
||||
#G15DEBUG="on"
|
||||
|
||||
# Additional options that are passed to the Daemon.
|
||||
DAEMON_OPTS=""
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
FAQ
|
||||
NEWS
|
||||
README
|
||||
TODO
|
||||
Vendored
+108
-20
@@ -2,10 +2,11 @@
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: g15daemon
|
||||
# Required-Start: $local_fs
|
||||
# Required-Stop: $local_fs
|
||||
# Required-Start: $syslog $local_fs
|
||||
# Required-Stop: $syslog $local_fs
|
||||
# Should-Start: $remote_fs
|
||||
# Should-Stop: $remote_fs
|
||||
# X-Start-Before: xdm kdm gdm ldm sdm
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: load deamon for Logitech G15 keyboard lcd display
|
||||
@@ -18,7 +19,7 @@ DAEMON=/usr/sbin/g15daemon
|
||||
NAME=g15daemon
|
||||
DESC=g15daemon
|
||||
|
||||
test -x $DAEMON || exit 0
|
||||
[ -x "$DAEMON" ] || exit 0
|
||||
|
||||
# Include g15daemon defaults if available
|
||||
if [ -f /etc/default/g15daemon ] ; then
|
||||
@@ -31,18 +32,76 @@ fi
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$G15DEBUG" = "on" ]; then
|
||||
|
||||
log() {
|
||||
logger -p daemon.debug -t g15 -- "$*"
|
||||
}
|
||||
else
|
||||
|
||||
log() {
|
||||
true
|
||||
}
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
wait_for_file() {
|
||||
local file=$1
|
||||
local timeout=$2
|
||||
[ "$timeout" ] || timeout=120
|
||||
|
||||
local count=$(($timeout * 10))
|
||||
while [ $count != 0 ]; do
|
||||
[ -e "$file" ] && return 0
|
||||
sleep 0.1
|
||||
count=$(($count - 1))
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
load_uinput() {
|
||||
if [ ! -e /dev/input/uinput ] ; then
|
||||
modprobe -q uinput || true
|
||||
wait_for_file /dev/input/uinput 3 || return 1
|
||||
fi
|
||||
}
|
||||
|
||||
wait_usr_mount() {
|
||||
if [ ! -e "$DAEMON" ] ; then
|
||||
wait_for_file "$DAEMON" 7 || return 1
|
||||
fi
|
||||
}
|
||||
|
||||
is_running() {
|
||||
start-stop-daemon --stop --test --quiet --pidfile \
|
||||
/var/run/$NAME.pid --exec $DAEMON
|
||||
}
|
||||
|
||||
do_start() {
|
||||
start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
|
||||
--exec $DAEMON -- $DAEMON_OPTS
|
||||
}
|
||||
|
||||
do_stop() {
|
||||
$DAEMON -k
|
||||
start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
|
||||
--oknodo --retry 5 --exec $DAEMON
|
||||
}
|
||||
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting $DESC: "
|
||||
start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
|
||||
--exec $DAEMON -- $DAEMON_OPTS
|
||||
load_uinput || echo -n ".../dev/input/uinput not found ..."
|
||||
do_start
|
||||
echo "$NAME."
|
||||
;;
|
||||
stop)
|
||||
echo -n "Stopping $DESC: "
|
||||
$DAEMON -k
|
||||
start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
|
||||
--oknodo --retry 5 --exec $DAEMON
|
||||
do_stop
|
||||
echo "$NAME."
|
||||
;;
|
||||
#reload)
|
||||
@@ -56,7 +115,7 @@ case "$1" in
|
||||
# echo "Reloading $DESC configuration files."
|
||||
# start-stop-daemon --stop --signal 1 --quiet --pidfile \
|
||||
# /var/run/$NAME.pid --exec $DAEMON
|
||||
#;;
|
||||
#;;
|
||||
force-reload)
|
||||
#
|
||||
# If the "reload" option is implemented, move the "force-reload"
|
||||
@@ -64,24 +123,53 @@ case "$1" in
|
||||
# just the same as "restart" except that it does nothing if the
|
||||
# daemon isn't already running.
|
||||
# check wether $DAEMON is running. If so, restart
|
||||
start-stop-daemon --stop --test --quiet --pidfile \
|
||||
/var/run/$NAME.pid --exec $DAEMON \
|
||||
&& $0 restart \
|
||||
|| exit 0
|
||||
;;
|
||||
is_running && $0 restart || exit 0
|
||||
;;
|
||||
restart)
|
||||
echo -n "Restarting $DESC: "
|
||||
start-stop-daemon --stop --quiet --pidfile \
|
||||
/var/run/$NAME.pid --exec $DAEMON
|
||||
do_stop
|
||||
# the device is slow to shut-down
|
||||
sleep 1
|
||||
start-stop-daemon --start --quiet --pidfile \
|
||||
/var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
|
||||
do_start
|
||||
echo "$NAME."
|
||||
;;
|
||||
udev)
|
||||
log "calling g15 udev; action: $ACTION, product $PRODUCT"
|
||||
if [ "x$ACTION" = "xadd" ] ; then
|
||||
load_uinput || true
|
||||
wait_usr_mount || true
|
||||
# it seems udev will not release a device if userspace is still
|
||||
# connected
|
||||
is_running && ( do_stop; sleep 1 )
|
||||
do_start
|
||||
elif [ "x$ACTION" = "xremove" ] ; then
|
||||
do_stop
|
||||
else
|
||||
echo "unknow udev action '$ACTION'"
|
||||
exit 1
|
||||
|
||||
fi
|
||||
;;
|
||||
shared-udev)
|
||||
# some devices share usb also for audio, which causes some spourios
|
||||
# udev messages.
|
||||
log "calling g15 shared-dev; action: $ACTION, product $PRODUCT"
|
||||
if [ "x$ACTION" = "xadd" ] ; then
|
||||
load_uinput || true
|
||||
wait_usr_mount || true
|
||||
do_start
|
||||
elif [ "x$ACTION" = "xremove" ] ; then
|
||||
do_stop
|
||||
else
|
||||
echo "unknow udev action '$ACTION'"
|
||||
exit 1
|
||||
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
N=/etc/init.d/$NAME
|
||||
# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
|
||||
echo "Usage: $N {start|stop|restart|force-reload}" >&2
|
||||
echo "Usage: $N {start|stop|restart|force-reload|udev}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
# udev rule to start g15daemon when logitech g15 keyboards are attached
|
||||
#
|
||||
# Recognized devices from libg15-1.2.7/libg15.c
|
||||
#
|
||||
|
||||
# Logitech g11 -- extra keys, no LCD
|
||||
ATTR{idVendor}=="046d", ATTR{idProduct}=="c225", RUN+="/etc/init.d/g15daemon udev"
|
||||
|
||||
# Logitech G15 (blue) -- extra keys and LCD
|
||||
ATTR{idVendor}=="046d", ATTR{idProduct}=="c222", RUN+="/etc/init.d/g15daemon udev"
|
||||
|
||||
# Logitech G15 v2 (orange) -- extra keys and LCD
|
||||
ATTR{idVendor}=="046d", ATTR{idProduct}=="c227", RUN+="/etc/init.d/g15daemon shared-udev"
|
||||
|
||||
# Logitech Z10 -- extra keys and LCD
|
||||
ATTR{idVendor}=="046d", ATTR{idProduct}=="0a07", RUN+="/etc/init.d/g15daemon udev"
|
||||
|
||||
# Logitech G15 Gamepanel -- extra keys and LCD
|
||||
ATTR{idVendor}=="046d", ATTR{idProduct}=="c251", RUN+="/etc/init.d/g15daemon shared-udev"
|
||||
|
||||
Vendored
+8
-2
@@ -7,7 +7,8 @@ AUTOMAKE_REMOVE += g15daemon/g15daemon g15daemon/g15daemontest
|
||||
AUTOMAKE_REMOVE += config.status config.log config.h config.h.in config/* libtool stamp-h1
|
||||
AUTOMAKE_REMOVE += */.libs/
|
||||
|
||||
#clean::
|
||||
clean::
|
||||
-rm -Rf debian/docs libg15daemon-client.install
|
||||
# -rm -Rf $(AUTOMAKE_REMOVE)
|
||||
|
||||
#makebuilddir:: Makefile
|
||||
@@ -24,5 +25,10 @@ AUTOMAKE_REMOVE += */.libs/
|
||||
include /usr/share/cdbs/1/rules/debhelper.mk
|
||||
include /usr/share/cdbs/1/class/autotools.mk
|
||||
|
||||
DEB_CONFIGURE_EXTRA_FLAGS = --quiet
|
||||
DEB_CONFIGURE_EXTRA_FLAGS = --quiet --disable-rpath
|
||||
|
||||
install/libg15daemon-client1::
|
||||
chrpath --delete $(DEB_DESTDIR)/usr/lib/libg15daemon_client.so.1.0.2 $(DEB_DESTDIR)/usr/lib/g15daemon/1.9.5.3/plugins/*.so $(DEB_DESTDIR)/usr/sbin/g15daemon
|
||||
|
||||
common-install-arch::
|
||||
sed -i "/dependency_libs/ s/'.*'/''/" `find . -name '*.la'`
|
||||
+1
-1
@@ -456,7 +456,7 @@ int main (int argc, char *argv[])
|
||||
struct passwd *nobody;
|
||||
unsigned char location[1024];
|
||||
|
||||
openlog("g15daemon", LOG_PID, LOG_USER);
|
||||
openlog("g15daemon", LOG_PID, LOG_DAEMON);
|
||||
if(strlen((char*)user)==0){
|
||||
nobody = getpwnam("nobody");
|
||||
}else {
|
||||
|
||||
@@ -356,7 +356,7 @@ int uf_conf_write(g15daemon_t *list,char *filename)
|
||||
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, 0644);
|
||||
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));
|
||||
@@ -666,12 +666,24 @@ int uf_conf_open(g15daemon_t *list, char *filename) {
|
||||
}
|
||||
|
||||
int uf_screendump_pbm(unsigned char *buffer,char *filename) {
|
||||
int fd;
|
||||
FILE *f;
|
||||
int x,y;
|
||||
#define WIDTH 40
|
||||
g15canvas *canvas=g15daemon_xmalloc(sizeof(g15canvas));
|
||||
memcpy(canvas->buffer,buffer,LCD_BUFSIZE);
|
||||
f = fopen(filename,"w+");
|
||||
fd = open(filename, O_CREAT|O_EXCL|O_WRONLY, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
|
||||
if(fd == -1) {
|
||||
g15daemon_log(LOG_WARNING, "uf_screendump_pbm failed: open, %s.\n", strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
f = fdopen(fd,"w");
|
||||
if(f==NULL) {
|
||||
close(fd);
|
||||
g15daemon_log(LOG_WARNING, "uf_screendump_pbm failed: fdopen, %s.\n", strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
fprintf(f,"P1\n160 43\n");
|
||||
fprintf(f,"# G15 screendump - %s\n\n",filename);
|
||||
for(y=0;y<43;y++)
|
||||
@@ -681,7 +693,9 @@ int uf_screendump_pbm(unsigned char *buffer,char *filename) {
|
||||
fprintf(f,"\n");
|
||||
}
|
||||
|
||||
fclose(f);
|
||||
fclose(f);
|
||||
fsync(fd);
|
||||
close(fd);
|
||||
free(canvas);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -125,6 +125,13 @@ static void g15_uinput_keydown(unsigned char code)
|
||||
event.value = G15KEY_DOWN;
|
||||
|
||||
write (uinp_fd, &event, sizeof(event));
|
||||
|
||||
memset(&event, 0, sizeof(event));
|
||||
|
||||
event.type = EV_SYN;
|
||||
event.code = SYN_REPORT;
|
||||
|
||||
write (uinp_fd, &event, sizeof(event));
|
||||
}
|
||||
|
||||
static void g15_uinput_keyup(unsigned char code)
|
||||
@@ -137,6 +144,13 @@ static void g15_uinput_keyup(unsigned char code)
|
||||
event.value = G15KEY_UP;
|
||||
|
||||
write (uinp_fd, &event, sizeof(event));
|
||||
|
||||
memset(&event, 0, sizeof(event));
|
||||
|
||||
event.type = EV_SYN;
|
||||
event.code = SYN_REPORT;
|
||||
|
||||
write (uinp_fd, &event, sizeof(event));
|
||||
}
|
||||
|
||||
void (*keyup)(unsigned char code) = &g15_uinput_keyup;
|
||||
|
||||
Reference in new issue
Block a user