changeset: 85:85411c4c0109
tag: tip
user: Enno Boland (tox) <tox_AT_s01.de>
date: Wed Sep 09 23:15:39 2009 +0200
files: config.def.h surf.c
description:
making all keys lowercase using shiftmask to determinate.
diff -r 5b4f47cba438 -r 85411c4c0109 config.def.h
--- a/config.def.h Wed Sep 09 22:22:20 2009 +0200
+++ b/config.def.h Wed Sep 09 23:15:39 2009 +0200
@@ -4,13 +4,13 @@
#define MODKEY GDK_CONTROL_MASK
static Key keys[] = {
/* modifier keyval function arg Focus */
- { MODKEY, GDK_R, reload, { .b = TRUE }, ALWAYS },
+ { MODKEY|GDK_SHIFT_MASK,GDK_r, reload, { .b = TRUE }, ALWAYS },
{ MODKEY, GDK_r, reload, { .b = FALSE }, ALWAYS },
{ MODKEY, GDK_g, showurl, { 0 }, ALWAYS },
{ MODKEY, GDK_slash, showsearch, { 0 }, ALWAYS },
{ 0, GDK_Escape, hidesearch, { 0 }, ALWAYS },
{ 0, GDK_Escape, hideurl, { 0 }, ALWAYS },
- { MODKEY, GDK_P, print, { 0 }, ALWAYS },
+ { MODKEY|GDK_SHIFT_MASK,GDK_p, print, { 0 }, ALWAYS },
{ MODKEY, GDK_p, clipboard, { .b = TRUE }, BROWSER },
{ MODKEY, GDK_y, clipboard, { .b = FALSE }, BROWSER },
{ MODKEY|GDK_SHIFT_MASK,GDK_j, zoom, { .i = -1 }, BROWSER },
@@ -23,7 +23,7 @@
{ 0, GDK_Escape, stop, { 0 }, BROWSER },
{ MODKEY, GDK_o, source, { 0 }, BROWSER },
{ MODKEY, GDK_n, searchtext, { .b = TRUE }, BROWSER|SEARCHBAR },
- { MODKEY, GDK_N, searchtext, { .b = FALSE }, BROWSER|SEARCHBAR },
+ { MODKEY|GDK_SHIFT_MASK,GDK_n, searchtext, { .b = FALSE }, BROWSER|SEARCHBAR },
{ 0, GDK_Return, searchtext, { .b = TRUE }, SEARCHBAR },
{ GDK_SHIFT_MASK, GDK_Return, searchtext, { .b = FALSE }, SEARCHBAR },
{ 0, GDK_Return, loaduri, { .v = NULL }, URLBAR },
diff -r 5b4f47cba438 -r 85411c4c0109 surf.c
--- a/surf.c Wed Sep 09 22:22:20 2009 +0200
+++ b/surf.c Wed Sep 09 23:15:39 2009 +0200
@@ -263,8 +263,9 @@
else
focus = BROWSER;
for(i = 0; i < LENGTH(keys); i++) {
- if(focus & keys[i].focus && ev->keyval == keys[i].keyval &&
- CLEANMASK(ev->state) == keys[i].mod
+ if(focus & keys[i].focus
+ && gdk_keyval_to_lower(ev->keyval) == keys[i].keyval
+ && CLEANMASK(ev->state) == keys[i].mod
&& keys[i].func) {
keys[i].func(c, &(keys[i].arg));
processed = TRUE;
Received on Wed Sep 09 2009 - 21:15:35 UTC
This archive was generated by hypermail 2.2.0 : Wed Sep 09 2009 - 21:24:05 UTC