[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xserver-xorg-input-joystick: Changes to 'upstream-unstable'



Rebased ref, commits from common ancestor:
commit eaf8d1a1d87af9f67ca3e3d0436bb9d9a7cfc17a
Author: Sascha Hlusiak <saschahlusiak@arcor.de>
Date:   Sat Oct 31 12:41:15 2009 +0100

    Bump to 1.5.0
    
    Signed-off-by: Sascha Hlusiak <saschahlusiak@arcor.de>

diff --git a/configure.ac b/configure.ac
index 3402d02..e0be568 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-input-joystick],
-        1.4.99.2,
+        1.5.0,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         xf86-input-joystick)
 

commit 657c01c8ebb9e0571d498356e6d3d03917199328
Author: Sascha Hlusiak <saschahlusiak@arcor.de>
Date:   Wed Oct 7 09:24:39 2009 +0200

    Revert "add shave support"
    
    This reverts commit 1fa414dd6f32d68378bc9d571c439a603c2e7888.

diff --git a/.gitignore b/.gitignore
index 443e330..e5a79a1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,5 +26,3 @@ xf86-input-joystick-*.tar.gz
 ChangeLog
 *.pc
 tags
-shave
-shave-libtool
diff --git a/acinclude.m4 b/acinclude.m4
deleted file mode 100644
index 0a3509e..0000000
--- a/acinclude.m4
+++ /dev/null
@@ -1,77 +0,0 @@
-dnl Make automake/libtool output more friendly to humans
-dnl  Damien Lespiau <damien.lespiau@gmail.com>
-dnl
-dnl SHAVE_INIT([shavedir],[default_mode])
-dnl
-dnl shavedir: the directory where the shave scripts are, it defaults to
-dnl           $(top_builddir)
-dnl default_mode: (enable|disable) default shave mode.  This parameter
-dnl               controls shave's behaviour when no option has been
-dnl               given to configure.  It defaults to disable.
-dnl
-dnl * SHAVE_INIT should be called late in your configure.(ac|in) file (just
-dnl   before AC_CONFIG_FILE/AC_OUTPUT is perfect.  This macro rewrites CC and
-dnl   LIBTOOL, you don't want the configure tests to have these variables
-dnl   re-defined.
-dnl * This macro requires GNU make's -s option.
-
-AC_DEFUN([_SHAVE_ARG_ENABLE],
-[
-  AC_ARG_ENABLE([shave],
-    AS_HELP_STRING(
-      [--enable-shave],
-      [use shave to make the build pretty [[default=$1]]]),,
-      [enable_shave=$1]
-    )
-])
-
-AC_DEFUN([SHAVE_INIT],
-[
-  dnl you can tweak the default value of enable_shave
-  m4_if([$2], [enable], [_SHAVE_ARG_ENABLE(yes)], [_SHAVE_ARG_ENABLE(no)])
-
-  if test x"$enable_shave" = xyes; then
-    dnl where can we find the shave scripts?
-    m4_if([$1],,
-      [shavedir="$ac_pwd"],
-      [shavedir="$ac_pwd/$1"])
-    AC_SUBST(shavedir)
-
-    dnl make is now quiet
-    AC_SUBST([MAKEFLAGS], [-s])
-    AC_SUBST([AM_MAKEFLAGS], ['`test -z $V && echo -s`'])
-
-    dnl we need sed
-    AC_CHECK_PROG(SED,sed,sed,false)
-
-    dnl substitute libtool
-    SHAVE_SAVED_LIBTOOL=$LIBTOOL
-    LIBTOOL="${SHELL} ${shavedir}/shave-libtool '${SHAVE_SAVED_LIBTOOL}'"
-    AC_SUBST(LIBTOOL)
-
-    dnl substitute cc/cxx
-    SHAVE_SAVED_CC=$CC
-    SHAVE_SAVED_CXX=$CXX
-    SHAVE_SAVED_FC=$FC
-    SHAVE_SAVED_F77=$F77
-    SHAVE_SAVED_OBJC=$OBJC
-    CC="${SHELL} ${shavedir}/shave cc ${SHAVE_SAVED_CC}"
-    CXX="${SHELL} ${shavedir}/shave cxx ${SHAVE_SAVED_CXX}"
-    FC="${SHELL} ${shavedir}/shave fc ${SHAVE_SAVED_FC}"
-    F77="${SHELL} ${shavedir}/shave f77 ${SHAVE_SAVED_F77}"
-    OBJC="${SHELL} ${shavedir}/shave objc ${SHAVE_SAVED_OBJC}"
-    AC_SUBST(CC)
-    AC_SUBST(CXX)
-    AC_SUBST(FC)
-    AC_SUBST(F77)
-    AC_SUBST(OBJC)
-
-    V=@
-  else
-    V=1
-  fi
-  Q='$(V:1=)'
-  AC_SUBST(V)
-  AC_SUBST(Q)
-])
-
diff --git a/configure.ac b/configure.ac
index 63f3f7e..3402d02 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,8 +32,6 @@ AM_INIT_AUTOMAKE([dist-bzip2])
 
 AM_MAINTAINER_MODE
 
-AC_CONFIG_FILES([shave shave-libtool])
-
 # Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG
 m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])])
 XORG_MACROS_VERSION(1.2)
@@ -123,8 +121,6 @@ XORG_MANPAGE_SECTIONS
 XORG_RELEASE_VERSION
 XORG_CHANGELOG
 
-SHAVE_INIT([.], [enable])
-
 AC_OUTPUT([Makefile
            src/Makefile
            man/Makefile
diff --git a/shave-libtool.in b/shave-libtool.in
deleted file mode 100644
index 1f3a720..0000000
--- a/shave-libtool.in
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/bin/sh
-
-# we need sed
-SED=@SED@
-if test -z "$SED" ; then
-SED=sed
-fi
-
-lt_unmangle ()
-{
-   last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_\-\.]*_la-##'`
-}
-
-# the real libtool to use
-LIBTOOL="$1"
-shift
-
-# if 1, don't print anything, the underlaying wrapper will do it
-pass_though=0
-
-# scan the arguments, keep the right ones for libtool, and discover the mode
-preserved_args=
-while test "$#" -gt 0; do
-    opt="$1"
-    shift
-
-    case $opt in
-    --mode=*)
-        mode=`echo $opt | $SED -e 's/[-_a-zA-Z0-9]*=//'`
-        preserved_args="$preserved_args $opt"
-        ;;
-    -o)
-        lt_output="$1"
-        preserved_args="$preserved_args $opt"
-	;;
-    *)
-        preserved_args="$preserved_args $opt"
-        ;;
-      esac
-done
-
-case "$mode" in
-compile)
-    # shave will be called and print the actual CC/CXX/LINK line
-    preserved_args="$preserved_args --shave-mode=$mode"
-    pass_though=1
-    ;;
-link)
-    preserved_args="$preserved_args --shave-mode=$mode"
-    Q="  LINK  "
-    ;;
-*)
-    # let's u
-    # echo "*** libtool: Unimplemented mode: $mode, fill a bug report"
-    ;;
-esac
-
-lt_unmangle "$lt_output"
-output=$last_result
-
-if test -z $V; then
-    if test $pass_though -eq 0; then
-        echo "$Q$output"
-    fi
-    $LIBTOOL --silent $preserved_args
-else
-    echo $LIBTOOL $preserved_args
-    $LIBTOOL $preserved_args
-fi
diff --git a/shave.in b/shave.in
deleted file mode 100644
index 5c16f27..0000000
--- a/shave.in
+++ /dev/null
@@ -1,79 +0,0 @@
-#!/bin/sh
-
-# we need sed
-SED=@SED@
-if test -z "$SED" ; then
-SED=sed
-fi
-
-lt_unmangle ()
-{
-   last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_\-\.]*_la-##'`
-}
-
-# the tool to wrap (cc, cxx, ar, ranlib, ..)
-tool="$1"
-shift
-
-# the reel tool (to call)
-REEL_TOOL="$1"
-shift
-
-pass_through=0
-preserved_args=
-while test "$#" -gt 0; do
-    opt="$1"
-    shift
-
-    case $opt in
-    --shave-mode=*)
-        mode=`echo $opt | $SED -e 's/[-_a-zA-Z0-9]*=//'`
-	;;
-    -o)
-        lt_output="$1"
-        preserved_args="$preserved_args $opt"
-	;;
-    *)
-        preserved_args="$preserved_args $opt"
-        ;;
-      esac
-done
-
-# mode=link is handled in the libtool wrapper
-case "$mode,$tool" in
-link,*)
-    pass_through=1
-    ;;
-*,cxx)
-    Q="  CXX   "
-    ;;
-*,cc)
-    Q="  CC    "
-    ;;
-*,fc)
-    Q="  FC    "
-    ;;
-*,f77)
-    Q="  F77   "
-    ;;
-*,objc)
-    Q="  OBJC   "
-    ;;
-*,*)
-    # should not happen
-    Q="  CC    "
-    ;;
-esac
-
-lt_unmangle "$lt_output"
-output=$last_result
-
-if test -z $V; then
-    if test $pass_through -eq 0; then
-        echo "$Q$output"
-    fi
-    $REEL_TOOL $preserved_args
-else
-    echo $REEL_TOOL $preserved_args
-    $REEL_TOOL $preserved_args
-fi

commit 1fa414dd6f32d68378bc9d571c439a603c2e7888
Author: Sascha Hlusiak <saschahlusiak@arcor.de>
Date:   Fri Oct 2 11:31:14 2009 +0200

    add shave support
    
    clean up compile output

diff --git a/.gitignore b/.gitignore
index e5a79a1..443e330 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,3 +26,5 @@ xf86-input-joystick-*.tar.gz
 ChangeLog
 *.pc
 tags
+shave
+shave-libtool
diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644
index 0000000..0a3509e
--- /dev/null
+++ b/acinclude.m4
@@ -0,0 +1,77 @@
+dnl Make automake/libtool output more friendly to humans
+dnl  Damien Lespiau <damien.lespiau@gmail.com>
+dnl
+dnl SHAVE_INIT([shavedir],[default_mode])
+dnl
+dnl shavedir: the directory where the shave scripts are, it defaults to
+dnl           $(top_builddir)
+dnl default_mode: (enable|disable) default shave mode.  This parameter
+dnl               controls shave's behaviour when no option has been
+dnl               given to configure.  It defaults to disable.
+dnl
+dnl * SHAVE_INIT should be called late in your configure.(ac|in) file (just
+dnl   before AC_CONFIG_FILE/AC_OUTPUT is perfect.  This macro rewrites CC and
+dnl   LIBTOOL, you don't want the configure tests to have these variables
+dnl   re-defined.
+dnl * This macro requires GNU make's -s option.
+
+AC_DEFUN([_SHAVE_ARG_ENABLE],
+[
+  AC_ARG_ENABLE([shave],
+    AS_HELP_STRING(
+      [--enable-shave],
+      [use shave to make the build pretty [[default=$1]]]),,
+      [enable_shave=$1]
+    )
+])
+
+AC_DEFUN([SHAVE_INIT],
+[
+  dnl you can tweak the default value of enable_shave
+  m4_if([$2], [enable], [_SHAVE_ARG_ENABLE(yes)], [_SHAVE_ARG_ENABLE(no)])
+
+  if test x"$enable_shave" = xyes; then
+    dnl where can we find the shave scripts?
+    m4_if([$1],,
+      [shavedir="$ac_pwd"],
+      [shavedir="$ac_pwd/$1"])
+    AC_SUBST(shavedir)
+
+    dnl make is now quiet
+    AC_SUBST([MAKEFLAGS], [-s])
+    AC_SUBST([AM_MAKEFLAGS], ['`test -z $V && echo -s`'])
+
+    dnl we need sed
+    AC_CHECK_PROG(SED,sed,sed,false)
+
+    dnl substitute libtool
+    SHAVE_SAVED_LIBTOOL=$LIBTOOL
+    LIBTOOL="${SHELL} ${shavedir}/shave-libtool '${SHAVE_SAVED_LIBTOOL}'"
+    AC_SUBST(LIBTOOL)
+
+    dnl substitute cc/cxx
+    SHAVE_SAVED_CC=$CC
+    SHAVE_SAVED_CXX=$CXX
+    SHAVE_SAVED_FC=$FC
+    SHAVE_SAVED_F77=$F77
+    SHAVE_SAVED_OBJC=$OBJC
+    CC="${SHELL} ${shavedir}/shave cc ${SHAVE_SAVED_CC}"
+    CXX="${SHELL} ${shavedir}/shave cxx ${SHAVE_SAVED_CXX}"
+    FC="${SHELL} ${shavedir}/shave fc ${SHAVE_SAVED_FC}"
+    F77="${SHELL} ${shavedir}/shave f77 ${SHAVE_SAVED_F77}"
+    OBJC="${SHELL} ${shavedir}/shave objc ${SHAVE_SAVED_OBJC}"
+    AC_SUBST(CC)
+    AC_SUBST(CXX)
+    AC_SUBST(FC)
+    AC_SUBST(F77)
+    AC_SUBST(OBJC)
+
+    V=@
+  else
+    V=1
+  fi
+  Q='$(V:1=)'
+  AC_SUBST(V)
+  AC_SUBST(Q)
+])
+
diff --git a/configure.ac b/configure.ac
index 59d6c0c..a33737a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,6 +32,8 @@ AM_INIT_AUTOMAKE([dist-bzip2])
 
 AM_MAINTAINER_MODE
 
+AC_CONFIG_FILES([shave shave-libtool])
+
 # Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG
 m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])])
 XORG_MACROS_VERSION(1.2)
@@ -121,6 +123,8 @@ XORG_MANPAGE_SECTIONS
 XORG_RELEASE_VERSION
 XORG_CHANGELOG
 
+SHAVE_INIT([.], [enable])
+
 AC_OUTPUT([Makefile
            src/Makefile
            man/Makefile
diff --git a/shave-libtool.in b/shave-libtool.in
new file mode 100644
index 0000000..1f3a720
--- /dev/null
+++ b/shave-libtool.in
@@ -0,0 +1,69 @@
+#!/bin/sh
+
+# we need sed
+SED=@SED@
+if test -z "$SED" ; then
+SED=sed
+fi
+
+lt_unmangle ()
+{
+   last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_\-\.]*_la-##'`
+}
+
+# the real libtool to use
+LIBTOOL="$1"
+shift
+
+# if 1, don't print anything, the underlaying wrapper will do it
+pass_though=0
+
+# scan the arguments, keep the right ones for libtool, and discover the mode
+preserved_args=
+while test "$#" -gt 0; do
+    opt="$1"
+    shift
+
+    case $opt in
+    --mode=*)
+        mode=`echo $opt | $SED -e 's/[-_a-zA-Z0-9]*=//'`
+        preserved_args="$preserved_args $opt"
+        ;;
+    -o)
+        lt_output="$1"
+        preserved_args="$preserved_args $opt"
+	;;
+    *)
+        preserved_args="$preserved_args $opt"
+        ;;
+      esac
+done
+
+case "$mode" in
+compile)
+    # shave will be called and print the actual CC/CXX/LINK line
+    preserved_args="$preserved_args --shave-mode=$mode"
+    pass_though=1
+    ;;
+link)
+    preserved_args="$preserved_args --shave-mode=$mode"
+    Q="  LINK  "
+    ;;
+*)
+    # let's u
+    # echo "*** libtool: Unimplemented mode: $mode, fill a bug report"
+    ;;
+esac
+
+lt_unmangle "$lt_output"
+output=$last_result
+
+if test -z $V; then
+    if test $pass_though -eq 0; then
+        echo "$Q$output"
+    fi
+    $LIBTOOL --silent $preserved_args
+else
+    echo $LIBTOOL $preserved_args
+    $LIBTOOL $preserved_args
+fi
diff --git a/shave.in b/shave.in
new file mode 100644
index 0000000..5c16f27
--- /dev/null
+++ b/shave.in
@@ -0,0 +1,79 @@
+#!/bin/sh
+
+# we need sed
+SED=@SED@
+if test -z "$SED" ; then
+SED=sed
+fi
+
+lt_unmangle ()
+{
+   last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_\-\.]*_la-##'`
+}
+
+# the tool to wrap (cc, cxx, ar, ranlib, ..)
+tool="$1"
+shift
+
+# the reel tool (to call)
+REEL_TOOL="$1"
+shift
+
+pass_through=0
+preserved_args=
+while test "$#" -gt 0; do
+    opt="$1"
+    shift
+
+    case $opt in
+    --shave-mode=*)
+        mode=`echo $opt | $SED -e 's/[-_a-zA-Z0-9]*=//'`
+	;;
+    -o)
+        lt_output="$1"
+        preserved_args="$preserved_args $opt"
+	;;
+    *)
+        preserved_args="$preserved_args $opt"
+        ;;
+      esac
+done
+
+# mode=link is handled in the libtool wrapper
+case "$mode,$tool" in
+link,*)
+    pass_through=1
+    ;;
+*,cxx)
+    Q="  CXX   "
+    ;;
+*,cc)
+    Q="  CC    "
+    ;;
+*,fc)
+    Q="  FC    "
+    ;;
+*,f77)
+    Q="  F77   "
+    ;;
+*,objc)
+    Q="  OBJC   "
+    ;;
+*,*)
+    # should not happen
+    Q="  CC    "
+    ;;
+esac
+
+lt_unmangle "$lt_output"
+output=$last_result
+
+if test -z $V; then
+    if test $pass_through -eq 0; then
+        echo "$Q$output"
+    fi
+    $REEL_TOOL $preserved_args
+else
+    echo $REEL_TOOL $preserved_args
+    $REEL_TOOL $preserved_args
+fi

commit 5fdab9ca49474d78f2ebfb27aa931565ce985e08
Author: Sascha Hlusiak <saschahlusiak@arcor.de>
Date:   Fri Sep 11 18:23:26 2009 +0200

    Fix NULL pointers in rmlvo

diff --git a/src/jstk.c b/src/jstk.c
index 42274ad..a2e927c 100644
--- a/src/jstk.c
+++ b/src/jstk.c
@@ -669,15 +669,15 @@ jstkCorePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
 
     priv->rmlvo.layout = xf86SetStrOption(dev->commonOptions, "xkb_layout", NULL);
     if (!priv->rmlvo.layout)
-	priv->rmlvo.layout = xf86SetStrOption(dev->commonOptions, "XkbLayout", "uk");
+	priv->rmlvo.layout = xf86SetStrOption(dev->commonOptions, "XkbLayout", "us");
 
     priv->rmlvo.variant = xf86SetStrOption(dev->commonOptions, "xkb_variant", NULL);
     if (!priv->rmlvo.variant)
-	priv->rmlvo.variant = xf86SetStrOption(dev->commonOptions, "XkbVariant", NULL);
+	priv->rmlvo.variant = xf86SetStrOption(dev->commonOptions, "XkbVariant", "");
 
     priv->rmlvo.options = xf86SetStrOption(dev->commonOptions, "xkb_options", NULL);
     if (!priv->rmlvo.options)
-	priv->rmlvo.options = xf86SetStrOption(dev->commonOptions, "XkbOptions", NULL);
+	priv->rmlvo.options = xf86SetStrOption(dev->commonOptions, "XkbOptions", "");
 
     priv->mouse_enabled = xf86SetBoolOption(dev->commonOptions, "StartMouseEnabled", TRUE);
     priv->keys_enabled = xf86SetBoolOption(dev->commonOptions, "StartKeysEnabled", TRUE);
diff --git a/src/jstk_key.c b/src/jstk_key.c
index 25b3856..fb1f52e 100644
--- a/src/jstk_key.c
+++ b/src/jstk_key.c
@@ -348,10 +348,6 @@ jstkInitKeys(DeviceIntPtr pJstk, JoystickDevPtr priv)
 
 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 5
     {
-/*        XkbRMLVOSet rmlvo; */
-/*        XkbGetRulesDflts(&rmlvo); */
-    	/* FIXME */
-	#warning KEYMAP FOR ABI_XINPUT_VERSION >= 5 BROKEN RIGHT NOW
         if (!InitKeyboardDeviceStruct(pJstk, &priv->rmlvo, NULL, jstkKbdCtrl))
         {
             ErrorF("unable to init keyboard device\n");
@@ -388,7 +384,7 @@ jstkInitKeys(DeviceIntPtr pJstk, JoystickDevPtr priv)
     if (!XkbInitKeyboardDeviceStruct(pJstk, &xkbnames,
                 &keySyms, modMap, NULL,
                 jstkKbdCtrl))
-        return 0;
+        return !Success;
 #endif
 
     /* Set Autorepeat and Delay */

commit 729b5bc6e3dba76ff763de27ec4c6e4c0933a9cd
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Sep 11 13:53:55 2009 +1000

    joystick 1.4.99.1
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/configure.ac b/configure.ac
index 8afad16..dafd453 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-input-joystick],
-        1.4.0,
+        1.4.99.1,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         xf86-input-joystick)
 

commit e8f22493833e33683e659ae348d9f58a43838252
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Sep 11 13:55:50 2009 +1000

    Fix typo in configure.

diff --git a/configure.ac b/configure.ac
index d8e107b..8afad16 100644
--- a/configure.ac
+++ b/configure.ac
@@ -136,7 +136,8 @@ echo Building BSD usbhid backend: $bsd_backend
 if test "x$linux_backend" != "xyes" -a \
 	"x$bsd_backend" != "xyes" -a \
 	"x$evdev_backend" != "xyes"; then
-    AC_MSG_ERROR([No backends were found. Your operating is not supported by the
-                  joystick driver. Contact xorg@lists.freedesktop.org if you are 
-                  interested in porting it.])
+    AC_MSG_ERROR([No backends were found. Your operating system is not
+                  supported by the joystick driver. Contact
+                  xorg@lists.freedesktop.org if you are interested in
+                  porting it.])
 fi

commit b2de71f4366c61a165562a573b30e1edd336ba5f
Author: Sascha Hlusiak <saschahlusiak@arcor.de>
Date:   Tue Jun 23 23:51:32 2009 +0200

    Support for axis labels; fix build on master
    
    The first two axes are always REL_X and REL_Y. All other axes and buttons
    are set to 'None', proper labeling will follow.
    
    Thanks to Peter for the heads up.
    
    Signed-off-by: Sascha Hlusiak <saschahlusiak@arcor.de>

diff --git a/src/jstk.c b/src/jstk.c
index 26f7a47..a02d7f0 100644
--- a/src/jstk.c
+++ b/src/jstk.c
@@ -1,5 +1,5 @@
 /*
- * Copyright 2007-2008 by Sascha Hlusiak. <saschahlusiak@freedesktop.org>     
+ * Copyright 2007-2009 by Sascha Hlusiak. <saschahlusiak@freedesktop.org>     
  * Copyright 1995-1999 by Frederic Lepied, France. <Lepied@XFree86.org>       
  *                                                                            
  * Permission to use, copy, modify, distribute, and sell this software and its
@@ -44,6 +44,9 @@
 #include "jstk_key.h"
 #include "jstk_options.h"
 #include "jstk_properties.h"
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3
+    #include <xserver-properties.h>
+#endif
 
 #ifdef LINUX_BACKEND
     #include "backend_joystick.h"
@@ -326,6 +329,10 @@ jstkDeviceControlProc(DeviceIntPtr       pJstk,
     int i;
     LocalDevicePtr   local = (LocalDevicePtr)pJstk->public.devicePrivate;
     JoystickDevPtr   priv  = (JoystickDevPtr)XI_PRIVATE(pJstk);
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+    Atom             btn_labels[BUTTONMAP_SIZE+1] = {0}; /* TODO: fillme */
+    Atom             axes_labels[MAXAXES] = {0}; /* TODO: fillme */
+#endif
 
     switch (what) {
     case DEVICE_INIT: {
@@ -341,9 +348,16 @@ jstkDeviceControlProc(DeviceIntPtr       pJstk,
             priv->close_proc(priv);
         }
 
-        for (m=0; m<=BUTTONMAP_SIZE; m++)
+        for (m=0; m<=BUTTONMAP_SIZE; m++) {
             buttonmap[m] = m;
+	}
+
+            
+            
         if (InitButtonClassDeviceStruct(pJstk, BUTTONMAP_SIZE, 
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+            btn_labels,
+#endif
             buttonmap) == FALSE) {
             ErrorF("unable to allocate Button class device\n");
             return !Success;
@@ -361,6 +375,9 @@ jstkDeviceControlProc(DeviceIntPtr       pJstk,
 
         if (InitValuatorClassDeviceStruct(pJstk, 
                                           m,
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+                                          axes_labels,
+#endif
 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3
                                           xf86GetMotionEvents, 
 #endif
@@ -371,6 +388,9 @@ jstkDeviceControlProc(DeviceIntPtr       pJstk,
         } else {
             InitValuatorAxisStruct(pJstk,
                                    0, /* valuator num */
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+                                   XIGetKnownProperty(AXIS_LABEL_PROP_REL_X),
+#endif
                                    0, /* min val */
                                    screenInfo.screens[0]->width, /* max val */
                                    1, /* resolution */
@@ -378,6 +398,9 @@ jstkDeviceControlProc(DeviceIntPtr       pJstk,
                                    1); /* max_res */
             InitValuatorAxisStruct(pJstk,
                                    1, /* valuator num */
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+                                   XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y),
+#endif
                                    0, /* min val */
                                    screenInfo.screens[0]->height, /* max val */
                                    1, /* resolution */
@@ -388,6 +411,9 @@ jstkDeviceControlProc(DeviceIntPtr       pJstk,
             {
                 InitValuatorAxisStruct(pJstk,
                                        priv->axis[i].valuator,
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+                                       axes_labels[i],
+#endif
                                        -32768, /* min val */
                                        32767,  /* max val */
                                        1, /* resolution */

commit 5e2b2a631063974ea6de7796f39106b85b2db31d
Author: Sascha Hlusiak <saschahlusiak@arcor.de>
Date:   Wed Apr 15 00:29:44 2009 +0200

    fix manpage and examples to reflect recent key changes

diff --git a/config/50-x11-input-joystick.fdi b/config/50-x11-input-joystick.fdi
index 0364362..aec77b0 100644
--- a/config/50-x11-input-joystick.fdi
+++ b/config/50-x11-input-joystick.fdi
@@ -33,13 +33,13 @@
 	<!-- EXAMPLES
 	<merge key="input.x11_options.DebugLevel" type="string">5</merge>
 	<merge key="input.x11_options.AutoRepeat" type="string">500 4</merge>
-	<merge key="input.x11_options.MapButton4" type="string">key=Alt_L+Tab</merge>
+	<merge key="input.x11_options.MapButton4" type="string">key=64+23</merge>
 	<merge key="input.x11_options.MapButton8" type="string">amplify=0.3</merge>
 	<merge key="input.x11_options.MapButton9" type="string">disable-mouse</merge>
-	<merge key="input.x11_options.MapButton10" type="string">key=space</merge>
+	<merge key="input.x11_options.MapButton10" type="string">key=65</merge>
 
-	<merge key="input.x11_options.MapAxis1" type="string">mode=accelerated keylow=Left keyhigh=Right</merge>
-	<merge key="input.x11_options.MapAxis2" type="string">mode=accelerated keylow=Up keyhigh=Down</merge>
+	<merge key="input.x11_options.MapAxis1" type="string">mode=accelerated keylow=113 keyhigh=114</merge>
+	<merge key="input.x11_options.MapAxis2" type="string">mode=accelerated keylow=111 keyhigh=116</merge>
 	-->
       </match>
     </match>
diff --git a/man/joystick.man b/man/joystick.man
index 03f9800..97e3ba3 100644
--- a/man/joystick.man
+++ b/man/joystick.man
@@ -93,10 +93,10 @@ Use positive and negative values to control the direction. Default: 1.0
 Amplifies the movement of all axes by the given factor when pressed. Different
 factors can be combined.
 .TP 7
-.BI "\*qkey="<keysym>[,<keysym>[,<keysym>[,<keysym>]]]
-When button is pressed, a series of keydown events with the specified keysym is
+.BI "\*qkey="<scancode>[,<scancode>[,<scancode>[,<scancode>]]]
+When button is pressed, a series of keydown events with the specified scancode is
 generated. When the button is released, keyup events in the opposite
-order are generated. You can specify up to 4 keysyms per button.
+order are generated. You can specify up to 4 scancodes per button.
 
 See special section about key events below.
 .TP 7
@@ -150,12 +150,12 @@ is an optional amplifier of the axis, like
 .B -, +, -5, 0.4, 1.3, ...
 Negative values will invert the movement. Default: 1.0
 .TP 7
-.BI "\*qkeylow= "<keysym>[,<keysym>[,<keysym>[,<keysym>]]]
+.BI "\*qkeylow= "<scancode>[,<scancode>[,<scancode>[,<scancode>]]]
 .TP 7
-.BI "\*qkeyhigh="<keysym>[,<keysym>[,<keysym>[,<keysym>]]]
+.BI "\*qkeyhigh="<scancode>[,<scancode>[,<scancode>[,<scancode>]]]
 When the axis is moved out of the deadzone, a series of keydown events according 
 to the direction of the movement is generated. When the axis is released, keyup 
-events will be generated. You can specify up to 4 keysyms for each direction. 
+events will be generated. You can specify up to 4 scancodes for each direction. 
 
 .B keylow
 defines the keys to be generated when the axis is moved in negative direction (ie. left or up),
@@ -270,45 +270,41 @@ total range of 200 pixels, 100 to the top and 100 to the bottom:
 .fi
 
 .SH "GENERATING KEY EVENTS"
-Providing a \*qkey=<keysym>[,<keysym>[...]]\*q option will generate X Events with the specified keysyms
+Providing a \*qkey=<scancode>[,<scancode>[...]]\*q option will generate X Events with the specified scancodes
 when the joystick button is pressed or the axis changed it's position. When the button/axis is released, the keys are released in the reverse order.
 
-The keysym parameter can be defined as a numerical value, which can be looked up in the file
-.IR /usr/include/X11/keysymdef.h ,
-or as the symbolic identifier (case sensitive, without the leading XK_).
+To lookup keycodes for KeySyms, you can use
+.BR "xmodmap -pk" .
+You can use unused keycodes and map them to a KeySym of your choice using xmodmap(1).
 
-You can specify up to 4 keysyms per joystick button/axis, which is useful to use modificators. Make sure you use the modificators
+You can specify up to 4 scancodes per joystick button/axis, which is useful to use modificators. Make sure you use modificators
 that are necessary to get a certain keysym.
 
 Examples:
 .nf
-.BI "  Option \*qMapButton1\*q     \*q" "key=0xffe9,0xff09" \*q
-.BI "  Option \*qMapButton1\*q     \*q" "key=Alt_L,Tab" \*q
+.BI "  Option \*qMapButton1\*q     \*q" "key=64,23" \*q
 .fi
 will generate
 .I "Alt_L+Tab"
 when the button is pressed.
 
 .nf
-.BI "  Option \*qMapButton1\*q     \*q" "key=0xffe1,0x0064" \*q
-.BI "  Option \*qMapButton1\*q     \*q" "key=Shift_L,d" \*q
+.BI "  Option \*qMapButton1\*q     \*q" "key=50,40" \*q
 .fi
-will generate an uppercase 
+will generate a Shift_L+d which will be an uppercase 
 .IR d .
 
 .nf
-.BI "  Option \*qMapButton1\*q     \*q" "key=0x0020" \*q
-.BI "  Option \*qMapButton1\*q     \*q" "key=32" \*q
-.BI "  Option \*qMapButton1\*q     \*q" "key=space" \*q
+.BI "  Option \*qMapButton1\*q     \*q" "key=65" \*q
 .fi
 is for the  
 .IR "space " key.
 
 .nf
-.BI "  Option  \*qMapAxis1\*q      \*q" "mode=relative    keylow=Left keyhigh=Right axis=0.5key" \*q
-.BI "  Option  \*qMapAxis2\*q      \*q" "mode=relative    keylow=Up   keyhigh=Down" \*q
-.BI "  Option  \*qMapAxis3\*q      \*q" "mode=accelerated keylow=Left keyhigh=Right" \*q
-.BI "  Option  \*qMapAxis4\*q      \*q" "mode=accelerated keylow=Up   keyhigh=Down" \*q
+.BI "  Option  \*qMapAxis1\*q      \*q" "mode=relative    keylow=113  keyhigh=114 axis=0.5key" \*q
+.BI "  Option  \*qMapAxis2\*q      \*q" "mode=relative    keylow=111  keyhigh=116" \*q
+.BI "  Option  \*qMapAxis3\*q      \*q" "mode=accelerated keylow=113  keyhigh=114" \*q
+.BI "  Option  \*qMapAxis4\*q      \*q" "mode=accelerated keylow=111  keyhigh=116" \*q
 .fi
 will map the first and third axis to the arrow keys
 .IR left " and " right
@@ -345,6 +341,6 @@ Example:
 .SH "SEE ALSO"
 __xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__), xmodmap(1)
 .SH AUTHORS
-Sascha Hlusiak (2007-2008),
+Sascha Hlusiak (2007-2009),
 .fi
 Frederic Lepied (1995-1999)

commit bf8626967263ee92d45759c58dc5bcc42a57176b
Author: Sascha Hlusiak <saschahlusiak@arcor.de>
Date:   Tue Apr 14 23:25:44 2009 +0200

    Property support for scancodes
    
    Allows setting scancodes for keys using input-properties

diff --git a/include/joystick-properties.h b/include/joystick-properties.h
index 0f0d4ed..49ef800 100644
--- a/include/joystick-properties.h
+++ b/include/joystick-properties.h
@@ -93,12 +93,12 @@ typedef enum _JSTK_MAPPING {
 /* FLOAT[MAXAXES], movement amplify per axis */
 #define JSTK_PROP_AXIS_AMPLIFY "Axis Amplify"
 
-/** Set KeySyms for axis in low position */
-/* TODO 16 bit */
+/** Scancodes for axis in low position */
+/* 8 bit, 4 per axis */
 #define JSTK_PROP_AXIS_KEYS_LOW "Axis Keys (low)"
 
-/** Set KeySyms for axis in high position */
-/* TODO 16 bit */
+/** Scancodes for axis in high position */
+/* 8 bit, 4 per axis */
 #define JSTK_PROP_AXIS_KEYS_HIGH "Axis keys (high)"
 
 /** Set the mapping of each button to
@@ -115,8 +115,8 @@ typedef enum _JSTK_MAPPING {
 /* FLOAT[MAXBUTTONS], amplify value per button */
 #define JSTK_PROP_BUTTON_AMPLIFY "Button Amplify"
 
-/** Set KeySyms for button */
-/* TODO 16 bit, set keysyms for button. Format: (button keysym1 keysym2 keysym3 keysym4) */
+/** Scancodes for button */
+/* 8 bit, 4 per button */
 #define JSTK_PROP_BUTTON_KEYS "Button Keys"
 
 
diff --git a/src/jstk.h b/src/jstk.h
index 9d42fb0..78a1f83 100644
--- a/src/jstk.h
+++ b/src/jstk.h
@@ -80,7 +80,7 @@ typedef void(*jstkCloseDeviceProc)(JoystickDevPtr joystick);
 typedef int(*jstkReadDataProc)(JoystickDevPtr joystick,
                                JOYSTICKEVENT *event, int *number);
 
-typedef unsigned int KEYSCANCODES [MAXKEYSPERBUTTON];
+typedef unsigned char KEYSCANCODES [MAXKEYSPERBUTTON];
 
 typedef struct _AXIS {
     JSTK_TYPE    type;
diff --git a/src/jstk_properties.c b/src/jstk_properties.c
index f2c562a..1ceeb06 100644
--- a/src/jstk_properties.c
+++ b/src/jstk_properties.c
@@ -71,7 +71,7 @@ jstkSetProperty(DeviceIntPtr pJstk, Atom atom, XIPropertyValuePtr val,
 {
     InputInfoPtr  pInfo = pJstk->public.devicePrivate;
     JoystickDevPtr priv = pInfo->private;
-    int i;
+    int i, j;
 
     if (atom == prop_debuglevel)
     {
@@ -173,12 +173,38 @@ jstkSetProperty(DeviceIntPtr pJstk, Atom atom, XIPropertyValuePtr val,
         }
     }else if (atom == prop_axis_keys_low)
     {
-        /* FIXME */
-        return BadValue;
+        unsigned char *values;
+        if (val->size != priv->num_axes*MAXKEYSPERBUTTON || val->format != 8 || val->type != XA_INTEGER)
+            return BadMatch;
+        if (!checkonly)


Reply to: