Skip to content
Snippets Groups Projects
Commit 5a05f95c authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Ignore Shift keystate, shift/non-shift keysyms differ anyways.

parent d9b4bcb1
No related branches found
No related tags found
No related merge requests found
......@@ -21,10 +21,10 @@ remove l Delete
delete C-l C-Delete
# and image movement
scroll_up S-J C-Up
scroll_down S-K C-Down
scroll_left S-H C-Left
scroll_right S-L C-Right
scroll_up J C-Up
scroll_down K C-Down
scroll_left H C-Left
scroll_right L C-Right
# zooming
zoom_in C-Up f
......
......@@ -698,8 +698,7 @@ looks like
.Pq for example Qo C-Delete Qc for Ctrl+Delete .
.Pp
Available modifiers are
.Ar C No for Control ,
.Ar S No for Shift and
.Ar C No for Control and
.Ar 1 No to Ar 5 No for Mod1 to Mod5 .
.Pp
Specifying an
......
......@@ -54,9 +54,6 @@ static void feh_set_parse_kb_partial(fehkey *key, int index, char *ks) {
case 'C':
mod = ControlMask;
break;
case 'S':
mod = ShiftMask;
break;
case '1':
mod = Mod1Mask;
break;
......@@ -296,8 +293,16 @@ void init_keyevents(void) {
static short feh_is_kp(fehkey *key, int sym, int state) {
int i;
/*
* Regarding the | 0x1: state 1 = shift, but we don't care about that.
* Shift produces different keysyms than non-shift anyways.
*/
for (i = 0; i < 3; i++) {
if ((key->keysyms[i] == sym) && (key->keystates[i] == state))
if (
(key->keysyms[i] == sym) &&
((key->keystates[i] | 0x1) == (state | 0x1)))
return 1;
else if (key->keysyms[i] == 0)
return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment