gnome-games r7755 - trunk/gnobots2
- From: jclinton svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-games r7755 - trunk/gnobots2
- Date: Sun, 29 Jun 2008 20:50:27 +0000 (UTC)
Author: jclinton
Date: Sun Jun 29 20:50:26 2008
New Revision: 7755
URL: http://svn.gnome.org/viewvc/gnome-games?rev=7755&view=rev
Log:
Allow CAPSLOCK with direction buttons (Emil Andersson, Bug #540755)
Modified:
trunk/gnobots2/keyboard.c
Modified: trunk/gnobots2/keyboard.c
==============================================================================
--- trunk/gnobots2/keyboard.c (original)
+++ trunk/gnobots2/keyboard.c Sun Jun 29 20:50:26 2008
@@ -22,6 +22,7 @@
#include <config.h>
#include <gnome.h>
#include <gdk/gdkkeysyms.h>
+#include <ctype.h>
#include "keyboard.h"
#include "keylabels.h"
@@ -86,8 +87,10 @@
if (event->state & (GDK_CONTROL_MASK | GDK_MOD1_MASK))
return FALSE;
+ gint keyval = toupper(event->keyval);
+
for (i = 0; i < 12; ++i) {
- if (event->keyval == control_keys[i]) {
+ if (keyval == toupper(control_keys[i])) {
game_keypress (i);
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]