* Copyright 2001, 2002 Ximian, Inc.
*
* This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
+ * modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
+ * version 2.1 of the License, or (at your option) any later version.
*
* This 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
- * Library General Public License for more details.
+ * Lesser General Public License for more details.
*
- * You should have received a copy of the GNU Library General Public
+ * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
*/
/* deviceeventcontroller-x11.c: X-specific DeviceEventController support */
(sym_rtn == keysym)) {
retval = Mod3Mask;
}
+ else if (XkbLookupKeySym (display, keycode, Mod4Mask, &mods_rtn, &sym_rtn) &&
+ (sym_rtn == keysym)) {
+ retval = Mod4Mask;
+ }
+ else if (XkbLookupKeySym (display, keycode, Mod5Mask, &mods_rtn, &sym_rtn) &&
+ (sym_rtn == keysym)) {
+ retval = Mod5Mask;
+ }
else if (XkbLookupKeySym (display, keycode,
ShiftMask | Mod2Mask, &mods_rtn, &sym_rtn) &&
(sym_rtn == keysym)) {
(sym_rtn == keysym)) {
retval = (Mod4Mask | ShiftMask);
}
+ else if (XkbLookupKeySym (display, keycode,
+ ShiftMask | Mod5Mask, &mods_rtn, &sym_rtn) &&
+ (sym_rtn == keysym)) {
+ retval = (Mod5Mask | ShiftMask);
+ }
else
retval = 0xFFFF;
return retval;
{
unsigned int time = CurrentTime;
unsigned int bounce_delay;
+#ifdef THIS_IS_BROKEN
unsigned int elapsed_msec;
struct timeval tv;
+#endif
DEControllerPrivateData *priv = controller->priv;
spi_x_error_trap ();
bounce_delay = xkb_get_bouncekeys_delay (controller);
if (bounce_delay)
{
+#ifdef THIS_IS_BROKEN
gettimeofday (&tv, NULL);
elapsed_msec =
(tv.tv_sec - priv->last_release_time.tv_sec) * 1000
+ (tv.tv_usec - priv->last_release_time.tv_usec) / 1000;
-#ifdef SPI_XKB_DEBUG
+# ifdef SPI_XKB_DEBUG
fprintf (stderr, "%d ms elapsed (%ld usec)\n", elapsed_msec,
(long) (tv.tv_usec - priv->last_release_time.tv_usec));
-#endif
-#ifdef THIS_IS_BROKEN
+# endif
if (elapsed_msec < bounce_delay)
time = bounce_delay - elapsed_msec + 1;
#else
{
unsigned int time = CurrentTime;
unsigned int slow_delay;
+#ifdef THIS_IS_BROKEN_DUNNO_WHY
unsigned int elapsed_msec;
struct timeval tv;
+#endif
DEControllerPrivateData *priv = controller->priv;
spi_x_error_trap ();
slow_delay = xkb_get_slowkeys_delay (controller);
if (slow_delay)
{
+#ifdef THIS_IS_BROKEN_DUNNO_WHY
gettimeofday (&tv, NULL);
elapsed_msec =
(tv.tv_sec - priv->last_press_time.tv_sec) * 1000
+ (tv.tv_usec - priv->last_press_time.tv_usec) / 1000;
-#ifdef SPI_XKB_DEBUG
+# ifdef SPI_XKB_DEBUG
fprintf (stderr, "%d ms elapsed (%ld usec)\n", elapsed_msec,
(long) (tv.tv_usec - priv->last_press_time.tv_usec));
-#endif
-#ifdef THIS_IS_BROKEN_DUNNO_WHY
+# endif
if (elapsed_msec < slow_delay)
time = slow_delay - elapsed_msec + 1;
#else