Add hotkeys 0.5.7.1, a program that allows usage of special keys on
internet/multimedia keyboards. PR: 52616 Submitted by: Andy Pavlo <amp0928@rit.edu>
This commit is contained in:
parent
1a62aab476
commit
0c99c03a15
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=82098
15 changed files with 673 additions and 0 deletions
|
@ -132,6 +132,7 @@
|
|||
SUBDIR += help2man
|
||||
SUBDIR += heyu
|
||||
SUBDIR += histring
|
||||
SUBDIR += hotkeys
|
||||
SUBDIR += hulgalugha
|
||||
SUBDIR += instant-server
|
||||
SUBDIR += instant-workstation
|
||||
|
|
40
misc/hotkeys/Makefile
Normal file
40
misc/hotkeys/Makefile
Normal file
|
@ -0,0 +1,40 @@
|
|||
# New ports collection makefile for: xquote
|
||||
# Date created: May 20th, 2003
|
||||
# Whom: Andy Pavlo <amp0928@rit.edu>
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= hotkeys
|
||||
PORTVERSION= 0.5.7.1
|
||||
CATEGORIES= misc
|
||||
MASTER_SITES= http://ypwong.org/hotkeys/${PORTVERSION}/ \
|
||||
${MASTER_SITE_XCONTRIB}
|
||||
DISTNAME= hotkeys_${PORTVERSION}
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
COMMENT= Allows usage of special keys on internet/multimedia keyboards
|
||||
|
||||
LIB_DEPENDS= xosd.4:${PORTSDIR}/misc/xosd \
|
||||
xml2.5:${PORTSDIR}/textproc/libxml2 \
|
||||
db3.3:${PORTSDIR}/databases/db3
|
||||
|
||||
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
|
||||
GNU_CONFIGURE= 1
|
||||
CONFIGURE_ARGS= --with-db3-inc=${LOCALBASE}/include/db3 \
|
||||
--with-db3-lib=${LOCALBASE}/lib \
|
||||
--with-xosd
|
||||
USE_GMAKE= yes
|
||||
|
||||
MAN1= hotkeys.1
|
||||
ORIG_CONFIG= ${PREFIX}/etc/hotkeys.conf
|
||||
SAMPLE_CONFIG= ${PREFIX}/etc/hotkeys.conf.sample
|
||||
|
||||
post-extract:
|
||||
@${CP} ${PATCHDIR}/error.h ${WRKSRC}/src
|
||||
@${CP} ${PATCHDIR}/eliteduo.def ${WRKSRC}/def
|
||||
|
||||
post-install:
|
||||
@${MV} ${ORIG_CONFIG} ${SAMPLE_CONFIG}
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
|
||||
.include <bsd.port.mk>
|
40
misc/hotkeys/Makefile~
Normal file
40
misc/hotkeys/Makefile~
Normal file
|
@ -0,0 +1,40 @@
|
|||
# New ports collection makefile for: xquote
|
||||
# Date created: May 20th, 2003
|
||||
# Whom: Andy Pavlo <amp0928@rit.edu>
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= hotkeys
|
||||
PORTVERSION= 0.5.7.1
|
||||
CATEGORIES= misc
|
||||
MASTER_SITES= http://ypwong.org/hotkeys/${PORTVERSION}/ \
|
||||
${MASTER_SITE_XCONTRIB}
|
||||
DISTNAME= hotkeys_${PORTVERSION}
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
COMMENT= Allows usuage of special keys on internet/multimedia keyboards
|
||||
|
||||
LIB_DEPENDS= xosd.4:${PORTSDIR}/misc/xosd \
|
||||
xml2.5:${PORTSDIR}/textproc/libxml2 \
|
||||
db3.3:${PORTSDIR}/databases/db3
|
||||
|
||||
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
|
||||
GNU_CONFIGURE= 1
|
||||
CONFIGURE_ARGS= --with-db3-inc=${LOCALBASE}/include/db3 \
|
||||
--with-db3-lib=${LOCALBASE}/lib \
|
||||
--with-xosd
|
||||
USE_GMAKE= yes
|
||||
|
||||
MAN1= hotkeys.1
|
||||
ORIG_CONFIG= ${PREFIX}/etc/hotkeys.conf
|
||||
SAMPLE_CONFIG= ${PREFIX}/etc/hotkeys.conf.sample
|
||||
|
||||
post-extract:
|
||||
@${CP} ${PATCHDIR}/error.h ${WRKSRC}/src
|
||||
@${CP} ${PATCHDIR}/eliteduo.def ${WRKSRC}/def
|
||||
|
||||
post-install:
|
||||
@${MV} ${ORIG_CONFIG} ${SAMPLE_CONFIG}
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
|
||||
.include <bsd.port.mk>
|
1
misc/hotkeys/distinfo
Normal file
1
misc/hotkeys/distinfo
Normal file
|
@ -0,0 +1 @@
|
|||
MD5 (hotkeys_0.5.7.1.tar.gz) = 68e2aea6b4444f943b5f85ac00542a1c
|
44
misc/hotkeys/files/eliteduo.def
Normal file
44
misc/hotkeys/files/eliteduo.def
Normal file
|
@ -0,0 +1,44 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<definition>
|
||||
|
||||
<config model="Logitech Cordless iTouch/Internet/Cordless Desktop">
|
||||
|
||||
<PrevTrack keycode="144"/>
|
||||
<Play keycode="162"/>
|
||||
<Stop keycode="164"/>
|
||||
<NextTrack keycode="153"/>
|
||||
|
||||
<VolUp keycode="176" adj="2"/>
|
||||
<VolDown keycode="174" adj="2"/>
|
||||
<Mute keycode="160"/>
|
||||
|
||||
<Email keycode="236"/>
|
||||
<Messenger keycode="145"/>
|
||||
<Webcam keycode="146"/>
|
||||
<Media keycode="237"/>
|
||||
<Search keycode="229"/>
|
||||
<Shopping keycode="148"/>
|
||||
<WebBrowser keycode="178"/>
|
||||
<Sleep keycode="223"/>
|
||||
|
||||
<!-- iTouch F-Key Utilities -->
|
||||
<Print keycode="122"/>
|
||||
<MyComputer keycode="195"/>
|
||||
<MyDocuments keycode="196"/>
|
||||
|
||||
<!-- Feel free to customize this -->
|
||||
|
||||
<userdef keycode="230" command="/usr/bin/mozilla -remote 'openURL(http://google.com)'">Go to URL</userdef>
|
||||
|
||||
<!-- Logitech key -->
|
||||
<userdef keycode="161" command="xman">Xman</userdef>
|
||||
|
||||
</config>
|
||||
|
||||
<contributor>
|
||||
<name>to be added</name>
|
||||
<email>to be added</email>
|
||||
</contributor>
|
||||
|
||||
</definition>
|
76
misc/hotkeys/files/error.h
Normal file
76
misc/hotkeys/files/error.h
Normal file
|
@ -0,0 +1,76 @@
|
|||
/* Declaration for error-reporting function
|
||||
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library. Its master source is NOT part of
|
||||
the C library, however. The master source lives in /gd/gnu/lib.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#ifndef _ERROR_H
|
||||
#define _ERROR_H 1
|
||||
|
||||
#ifndef __attribute__
|
||||
/* This feature is available in gcc versions 2.5 and later. */
|
||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
|
||||
# define __attribute__(Spec) /* empty */
|
||||
# endif
|
||||
/* The __-protected variants of `format' and `printf' attributes
|
||||
are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
|
||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
|
||||
# define __format__ format
|
||||
# define __printf__ printf
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined (__STDC__) && __STDC__
|
||||
|
||||
/* Print a message with `fprintf (stderr, FORMAT, ...)';
|
||||
if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
|
||||
If STATUS is nonzero, terminate the program with `exit (STATUS)'. */
|
||||
|
||||
extern void error (int status, int errnum, const char *format, ...)
|
||||
__attribute__ ((__format__ (__printf__, 3, 4)));
|
||||
|
||||
extern void error_at_line (int status, int errnum, const char *fname,
|
||||
unsigned int lineno, const char *format, ...)
|
||||
__attribute__ ((__format__ (__printf__, 5, 6)));
|
||||
|
||||
/* If NULL, error will flush stdout, then print on stderr the program
|
||||
name, a colon and a space. Otherwise, error will call this
|
||||
function without parameters instead. */
|
||||
extern void (*error_print_progname) (void);
|
||||
|
||||
#else
|
||||
void error ();
|
||||
void error_at_line ();
|
||||
extern void (*error_print_progname) ();
|
||||
#endif
|
||||
|
||||
/* This variable is incremented each time `error' is called. */
|
||||
extern unsigned int error_message_count;
|
||||
|
||||
/* Sometimes we want to have at most one error per line. This
|
||||
variable controls whether this mode is selected or not. */
|
||||
extern int error_one_per_line;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* error.h */
|
58
misc/hotkeys/files/patch-configure
Normal file
58
misc/hotkeys/files/patch-configure
Normal file
|
@ -0,0 +1,58 @@
|
|||
--- configure.orig Sun Dec 8 09:34:24 2002
|
||||
+++ configure Sun May 11 22:17:53 2003
|
||||
@@ -251,6 +251,7 @@
|
||||
# Initializations.
|
||||
#
|
||||
ac_default_prefix=/usr/local
|
||||
+
|
||||
ac_config_libobj_dir=.
|
||||
cross_compiling=no
|
||||
subdirs=
|
||||
@@ -648,6 +649,21 @@
|
||||
esac
|
||||
done
|
||||
|
||||
+#################################################################
|
||||
+## Andy Pavlo
|
||||
+## For some reason it wouldn't install in the right
|
||||
+## dir if we gave it a prefix
|
||||
+## I hope this fixes it
|
||||
+#################################################################
|
||||
+if test $prefix != "NONE"; then
|
||||
+ ac_default_prefix=$prefix
|
||||
+else
|
||||
+ ac_default_prefix=$ac_default_prefix
|
||||
+fi
|
||||
+#################################################################
|
||||
+## END FIX
|
||||
+#################################################################
|
||||
+
|
||||
if test -n "$ac_prev"; then
|
||||
ac_option=--`echo $ac_prev | sed 's/_/-/g'`
|
||||
{ echo "$as_me: error: missing argument to $ac_option" >&2
|
||||
@@ -4353,13 +4369,13 @@
|
||||
fi
|
||||
|
||||
|
||||
-echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
|
||||
-echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
|
||||
+echo "$as_me:$LINENO: checking for pthread_create in -pthread" >&5
|
||||
+echo $ECHO_N "checking for pthread_create in -pthread... $ECHO_C" >&6
|
||||
if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
-LIBS="-lpthread $LIBS"
|
||||
+LIBS="-pthread $LIBS"
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
#line $LINENO "configure"
|
||||
/* confdefs.h. */
|
||||
@@ -4412,7 +4428,7 @@
|
||||
#define HAVE_LIBPTHREAD 1
|
||||
_ACEOF
|
||||
|
||||
- LIBS="-lpthread $LIBS"
|
||||
+ LIBS="-pthread $LIBS"
|
||||
|
||||
fi
|
||||
|
20
misc/hotkeys/files/patch-src-Makefile
Normal file
20
misc/hotkeys/files/patch-src-Makefile
Normal file
|
@ -0,0 +1,20 @@
|
|||
--- src/Makefile.in.orig Sun Dec 8 09:34:44 2002
|
||||
+++ src/Makefile.in Sun May 11 16:18:57 2003
|
||||
@@ -96,7 +96,7 @@
|
||||
l = @l@
|
||||
|
||||
bin_PROGRAMS = hotkeys
|
||||
-hotkeys_SOURCES = hotkeys.c kbddef.c conf.c fixVMware.c apmlib.c xmalloc.c splash.c XF86keysym.h apm.h common.h conf.h hotkeys.h kbddef.h xmalloc.h splash.h
|
||||
+hotkeys_SOURCES = hotkeys.c kbddef.c conf.c fixVMware.c xmalloc.c splash.c XF86keysym.h common.h conf.h hotkeys.h kbddef.h xmalloc.h splash.h
|
||||
|
||||
sysconf_DATA = hotkeys.conf
|
||||
man_MANS = hotkeys.1
|
||||
@@ -120,7 +120,7 @@
|
||||
X_LIBS = @X_LIBS@
|
||||
X_EXTRA_LIBS = @X_EXTRA_LIBS@
|
||||
X_PRE_LIBS = @X_PRE_LIBS@
|
||||
-hotkeys_OBJECTS = hotkeys.o kbddef.o conf.o fixVMware.o apmlib.o \
|
||||
+hotkeys_OBJECTS = hotkeys.o kbddef.o conf.o fixVMware.o \
|
||||
xmalloc.o splash.o
|
||||
hotkeys_LDADD = $(LDADD)
|
||||
hotkeys_DEPENDENCIES =
|
21
misc/hotkeys/files/patch-src-conf.c
Normal file
21
misc/hotkeys/files/patch-src-conf.c
Normal file
|
@ -0,0 +1,21 @@
|
|||
--- src/conf.c.orig Wed Nov 27 14:30:08 2002
|
||||
+++ src/conf.c Sun May 11 16:01:17 2003
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "common.h"
|
||||
|
||||
#include <stdio.h>
|
||||
-#include <db.h>
|
||||
+#include </usr/local/include/db3/db.h>
|
||||
#include <string.h>
|
||||
#include <sys/param.h>
|
||||
|
||||
@@ -68,6 +68,9 @@
|
||||
"Shopping", "mozilla -remote 'openURL(http://thinkgeek.com)'",
|
||||
"Go", "mozilla -remote 'openURL(http://linux.com)'",
|
||||
"Print", "lpr",
|
||||
+ "Messenger", "gaim",
|
||||
+ "Webcam", "\0",
|
||||
+ "Media", "xmms",
|
||||
/*
|
||||
"Screendump", "xwd -root",
|
||||
*/
|
280
misc/hotkeys/files/patch-src-hotkeys.c
Normal file
280
misc/hotkeys/files/patch-src-hotkeys.c
Normal file
|
@ -0,0 +1,280 @@
|
|||
--- src/hotkeys.c.orig Tue Dec 3 14:26:32 2002
|
||||
+++ src/hotkeys.c Sun May 11 22:56:06 2003
|
||||
@@ -66,9 +66,9 @@
|
||||
#endif /* __FreeBSD__ */
|
||||
|
||||
/* CDROM related */
|
||||
-#include <linux/cdrom.h> /* FIXME: linux specific! */
|
||||
+//#include <linux/cdrom.h> /* FIXME: linux specific! */
|
||||
/* APM (suspend/standby) support */
|
||||
-#include "apm.h"
|
||||
+//#include "apm.h"
|
||||
#if HAVE_GTK
|
||||
#include "splash.h"
|
||||
#endif
|
||||
@@ -585,7 +585,7 @@
|
||||
{
|
||||
int mixer_fd = -1, cdrom_fd = -1;
|
||||
int master_vol, cd_vol;
|
||||
- struct cdrom_volctrl cdrom_vol;
|
||||
+// struct cdrom_volctrl cdrom_vol;
|
||||
int left, right;
|
||||
static struct timeval last_time;
|
||||
struct timeval this_time;
|
||||
@@ -683,6 +683,7 @@
|
||||
}
|
||||
|
||||
/* open the cdrom/dvdrom drive device */
|
||||
+/***** ANDY: No CD support yet
|
||||
if ( cdromDevice != NULL )
|
||||
{
|
||||
if ( (cdrom_fd = open( cdromDevice, O_RDONLY|O_NONBLOCK )) == -1 )
|
||||
@@ -691,7 +692,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
- /* read the cdrom volume */
|
||||
+ || read the cdrom volume ||
|
||||
if ( ioctl(cdrom_fd, CDROMVOLREAD, &cdrom_vol) == -1 )
|
||||
{
|
||||
uError("Unable to read the CDROM volume of `%s'", cdromDevice);
|
||||
@@ -699,7 +700,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
- /* Set the CDROM volume */
|
||||
+ || Set the CDROM volume ||
|
||||
int t;
|
||||
float myAdj;
|
||||
myAdj = 0xFF / 100.0 * adj;
|
||||
@@ -721,9 +722,10 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
+END Andy *****/
|
||||
|
||||
if (mixer_fd != -1) close(mixer_fd);
|
||||
- if (cdrom_fd != -1) close(cdrom_fd);
|
||||
+//Andy if (cdrom_fd != -1) close(cdrom_fd);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -737,10 +739,10 @@
|
||||
{
|
||||
static Bool muted = False;
|
||||
static int last_mixer_vol, last_cd_vol;
|
||||
- static struct cdrom_volctrl last_cdrom_vol;
|
||||
+//Andy static struct cdrom_volctrl last_cdrom_vol;
|
||||
|
||||
int vol, cd_vol;
|
||||
- struct cdrom_volctrl cdrom_vol;
|
||||
+//Andy struct cdrom_volctrl cdrom_vol;
|
||||
int mixer_fd = -1, cdrom_fd = -1;
|
||||
|
||||
short ret = 0; /* return value */
|
||||
@@ -751,6 +753,7 @@
|
||||
uError("Unable to open `%s'", MIXER_DEV);
|
||||
}
|
||||
/* open the cdrom/dvdrom drive device */
|
||||
+/***** Andy: No CD support
|
||||
if ( cdromDevice != NULL )
|
||||
{
|
||||
if ( (cdrom_fd = open( cdromDevice, O_RDONLY|O_NONBLOCK )) == -1 )
|
||||
@@ -758,6 +761,7 @@
|
||||
uError("Unable to open `%s'", cdromDevice);
|
||||
}
|
||||
}
|
||||
+END Andy *****/
|
||||
|
||||
if ( muted )
|
||||
{
|
||||
@@ -783,6 +787,7 @@
|
||||
#endif
|
||||
}
|
||||
}
|
||||
+/***** Andy: No CD support
|
||||
#if 0
|
||||
if (SOUND_IOCTL(mixer_fd, SOUND_MIXER_WRITE_CD, &last_cd_vol) == -1)
|
||||
{
|
||||
@@ -800,6 +805,7 @@
|
||||
} else
|
||||
muted = False;
|
||||
}
|
||||
+End Andy *****/
|
||||
}
|
||||
else /* ! muted */
|
||||
{
|
||||
@@ -837,6 +843,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
+/***** Andy: No CD support
|
||||
#if 0
|
||||
if ( SOUND_IOCTL(mixer_fd, SOUND_MIXER_READ_CD, &last_cd_vol) == -1)
|
||||
{
|
||||
@@ -853,7 +860,9 @@
|
||||
muted = True;
|
||||
}
|
||||
#endif
|
||||
+End Andy *****/
|
||||
/* read and store the cdrom volume */
|
||||
+/***** Andy: No CD support
|
||||
if (cdrom_fd != -1)
|
||||
{
|
||||
if ( ioctl(cdrom_fd, CDROMVOLREAD, &last_cdrom_vol) == -1 )
|
||||
@@ -863,8 +872,8 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
- /* Set the volume to 0. FIXME: is this linux specific? Do
|
||||
- * other platforms also have 4 channels? */
|
||||
+ || Set the volume to 0. FIXME: is this linux specific? Do
|
||||
+ * other platforms also have 4 channels? ||
|
||||
cdrom_vol.channel0 = cdrom_vol.channel1 = cdrom_vol.channel2 =
|
||||
cdrom_vol.channel3 = 0;
|
||||
if ( ioctl(cdrom_fd, CDROMVOLCTRL, &cdrom_vol) == -1 )
|
||||
@@ -875,10 +884,11 @@
|
||||
muted = True;
|
||||
}
|
||||
}
|
||||
+End Andy *****/
|
||||
}
|
||||
|
||||
if (mixer_fd != -1) close(mixer_fd);
|
||||
- if (cdrom_fd != -1) close(cdrom_fd);
|
||||
+//Andy if (cdrom_fd != -1) close(cdrom_fd);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -886,19 +896,20 @@
|
||||
static int
|
||||
ejectDisc(void)
|
||||
{
|
||||
+/***** Andy: No CD support
|
||||
int fd, status;
|
||||
|
||||
if ( cdromDevice == NULL )
|
||||
return 0;
|
||||
|
||||
- /* the idea of this code is from xine's vcd plugin, mostly linux
|
||||
- specific FIXME */
|
||||
+ || the idea of this code is from xine's vcd plugin, mostly linux
|
||||
+ specific FIXME ||
|
||||
if ( (fd = open( cdromDevice, O_RDONLY | O_NONBLOCK)) > -1 ) {
|
||||
status = ioctl(fd, CDROM_DRIVE_STATUS, CDSL_CURRENT);
|
||||
switch (status)
|
||||
{
|
||||
- /* Looks like ATAPI drives doesn't return CDS_TRAY_OPEN,
|
||||
- * at least it's the case on my ASUS DVD drive... */
|
||||
+ || Looks like ATAPI drives doesn't return CDS_TRAY_OPEN,
|
||||
+ * at least it's the case on my ASUS DVD drive... ||
|
||||
case CDS_TRAY_OPEN:
|
||||
#ifdef HAVE_LIBXOSD
|
||||
if ( osd )
|
||||
@@ -929,7 +940,7 @@
|
||||
case CDS_NO_INFO:
|
||||
case CDS_DRIVE_NOT_READY:
|
||||
default:
|
||||
- /* Ignore */
|
||||
+ || Ignore ||
|
||||
break;
|
||||
}
|
||||
close(fd);
|
||||
@@ -940,6 +951,7 @@
|
||||
SYSLOG(LOG_NOTICE, "CDROM_DRIVE_STATUS failed: %s\n", strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
+End Andy *****/
|
||||
}
|
||||
|
||||
|
||||
@@ -1002,8 +1014,8 @@
|
||||
#ifdef HAVE_LIBXOSD
|
||||
if ( osd )
|
||||
{
|
||||
- xosd_display(osd, 0, XOSD_string, "Launching:");
|
||||
- xosd_display(osd, 1, XOSD_string, getConfig(type));
|
||||
+ xosd_display(osd, 0, XOSD_string, type);
|
||||
+ xosd_display(osd, 1, XOSD_string, "");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -1015,13 +1027,14 @@
|
||||
int
|
||||
sleepState(int mode)
|
||||
{
|
||||
+/***** Andy: No APM support
|
||||
#ifdef USE_APMD
|
||||
switch (mode)
|
||||
{
|
||||
- case SUSPEND:
|
||||
+ // case SUSPEND:
|
||||
error = system("apm -s");
|
||||
break;
|
||||
- case STANDBY:
|
||||
+ // case STANDBY:
|
||||
error = system("apm -S");
|
||||
break;
|
||||
default:
|
||||
@@ -1039,10 +1052,10 @@
|
||||
}
|
||||
switch (mode)
|
||||
{
|
||||
- case SUSPEND:
|
||||
+ // case SUSPEND:
|
||||
error = apm_suspend(fd);
|
||||
break;
|
||||
- case STANDBY:
|
||||
+ // case STANDBY:
|
||||
error = apm_standby(fd);
|
||||
break;
|
||||
default:
|
||||
@@ -1050,7 +1063,9 @@
|
||||
break;
|
||||
}
|
||||
apm_close(fd);
|
||||
-#endif /* USE_APMD */
|
||||
+#endif
|
||||
+End Andy *****/
|
||||
+/* USE_APMD */
|
||||
}
|
||||
|
||||
|
||||
@@ -1105,8 +1120,8 @@
|
||||
#ifdef HAVE_LIBXOSD
|
||||
if ( osd )
|
||||
{
|
||||
- xosd_display(osd, 0, XOSD_string, "Launching:");
|
||||
- xosd_display(osd, 1, XOSD_string, kbd.customCmds[i].desc);
|
||||
+ xosd_display(osd, 0, XOSD_string, kbd.customCmds[i].desc);
|
||||
+ xosd_display(osd, 1, XOSD_string, "");
|
||||
}
|
||||
#endif
|
||||
break; /* break the for loop */
|
||||
@@ -1444,6 +1459,7 @@
|
||||
3 /* shadow offset */,
|
||||
3 /* number_lines */
|
||||
);
|
||||
+ xosd_set_align(osd, XOSD_center);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -1592,6 +1608,7 @@
|
||||
doMute();
|
||||
} else
|
||||
/* APM stuffs */
|
||||
+/**** Andy: No APM support
|
||||
if ( ev.message.keycode == (kbd.defCmds)[sleepKey].key ||
|
||||
ev.message.keycode == (kbd.defCmds)[wakeupKey].key ) {
|
||||
sleepState(STANDBY);
|
||||
@@ -1601,8 +1618,9 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
+End Andy *****/
|
||||
lookupUserCmd(ev.message.keycode); /* User-defined stuffs */
|
||||
- }
|
||||
+//Andy }
|
||||
}
|
||||
}
|
||||
|
23
misc/hotkeys/files/patch-src-kbddef.c
Normal file
23
misc/hotkeys/files/patch-src-kbddef.c
Normal file
|
@ -0,0 +1,23 @@
|
|||
--- src/kbddef.c.orig Wed Nov 27 14:51:11 2002
|
||||
+++ src/kbddef.c Sun May 11 16:01:17 2003
|
||||
@@ -37,8 +37,8 @@
|
||||
*/
|
||||
#include "XF86keysym.h"
|
||||
|
||||
-#include <xmlmemory.h>
|
||||
-#include <parser.h>
|
||||
+#include <libxml2/libxml/xmlmemory.h>
|
||||
+#include <libxml2/libxml/parser.h>
|
||||
|
||||
#include "hotkeys.h"
|
||||
#include "kbddef.h"
|
||||
@@ -71,6 +71,9 @@
|
||||
{ "MyComputer", myComputerKey, XF86XK_MyComputer },
|
||||
{ "Favorites", favoritesKey, XF86XK_Favorites },
|
||||
{ "Calculator", calculatorKey, XF86XK_Calculator },
|
||||
+ { "Messenger", messengerKey, 0 },
|
||||
+ { "Webcam", webcamKey, 0 },
|
||||
+ { "Media", mediaKey, 0 },
|
||||
{ "NewsReader", newsReaderKey, 0 },
|
||||
{ "iNews", iNewsKey, 0 },
|
||||
{ "Rewind", rewindKey, 0 },
|
12
misc/hotkeys/files/patch-src-kbddef.h
Normal file
12
misc/hotkeys/files/patch-src-kbddef.h
Normal file
|
@ -0,0 +1,12 @@
|
|||
--- src/kbddef.h.orig Mon Mar 19 01:51:24 2001
|
||||
+++ src/kbddef.h Sun May 11 16:01:17 2003
|
||||
@@ -55,6 +55,9 @@
|
||||
myComputerKey,
|
||||
favoritesKey,
|
||||
calculatorKey,
|
||||
+ messengerKey,
|
||||
+ webcamKey,
|
||||
+ mediaKey,
|
||||
newsReaderKey,
|
||||
iNewsKey,
|
||||
rewindKey,
|
11
misc/hotkeys/pkg-descr
Normal file
11
misc/hotkeys/pkg-descr
Normal file
|
@ -0,0 +1,11 @@
|
|||
This program sits at the back and listens for the "special" hotkeys that
|
||||
you won't normally use on your internet/Multimedia keyboards.
|
||||
The buttons perform their intended behaviors, such as volume up and down,
|
||||
mute the speaker, launch applications, etc.
|
||||
|
||||
NOTE: CDROM & APM features have been disabled
|
||||
|
||||
WWW: http://ypwong.org/hotkeys/
|
||||
|
||||
-Andy Pavlo
|
||||
amp0928@rit.edu
|
16
misc/hotkeys/pkg-message
Normal file
16
misc/hotkeys/pkg-message
Normal file
|
@ -0,0 +1,16 @@
|
|||
|
||||
=======================================================================
|
||||
At this current stage CDROM & APM support has been disabled.
|
||||
I will need to remap the linux CDROM cdrom.h code to work with
|
||||
FreeBSD's cdio.h library
|
||||
=======================================================================
|
||||
|
||||
Rename ${PREFIX}/etc/hotkeys.conf.default to ${PREFIX}/etc/hotkeys.conf
|
||||
and edit to setup your keyboard settings
|
||||
|
||||
-- OR --
|
||||
|
||||
Copy to ~/.hotkeys/hotkeys.conf and edit config there
|
||||
|
||||
=======================================================================
|
||||
|
30
misc/hotkeys/pkg-plist
Normal file
30
misc/hotkeys/pkg-plist
Normal file
|
@ -0,0 +1,30 @@
|
|||
bin/hotkeys
|
||||
etc/hotkeys.conf.sample
|
||||
share/hotkeys/splash.png
|
||||
share/hotkeys/acerwl.def
|
||||
share/hotkeys/btc9000.def
|
||||
share/hotkeys/eliteduo.def
|
||||
share/hotkeys/hp5181.def
|
||||
share/hotkeys/ibook.def
|
||||
share/hotkeys/itouch.def
|
||||
share/hotkeys/kb9930.def
|
||||
share/hotkeys/kb9963.def
|
||||
share/hotkeys/kbp8993.def
|
||||
share/hotkeys/logitech-cfo.def
|
||||
share/hotkeys/mck800.def
|
||||
share/hotkeys/msnatpro.def
|
||||
share/hotkeys/msnet.def
|
||||
share/hotkeys/msnetpro.def
|
||||
share/hotkeys/mx1998.def
|
||||
share/hotkeys/mx2500.def
|
||||
share/hotkeys/mx3000.def
|
||||
share/hotkeys/orktekusb.def
|
||||
share/hotkeys/pb5140w.def
|
||||
share/hotkeys/polypix.def
|
||||
share/hotkeys/sk2500.def
|
||||
share/hotkeys/sk2501a.def
|
||||
share/hotkeys/sk2505.def
|
||||
share/hotkeys/sk2800c.def
|
||||
share/hotkeys/sk7100.def
|
||||
share/hotkeys/sk9925.def
|
||||
@dirrm share/hotkeys
|
Loading…
Reference in a new issue