mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-13 08:23:46 +01:00
Fix shortcut evaluation
This commit is contained in:
parent
3604922a95
commit
403c63c510
16
zathura.c
16
zathura.c
@ -3878,15 +3878,17 @@ cb_view_kb_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data)
|
|||||||
ShortcutList* sc = Zathura.Bindings.sclist;
|
ShortcutList* sc = Zathura.Bindings.sclist;
|
||||||
while(sc)
|
while(sc)
|
||||||
{
|
{
|
||||||
if( event->keyval == sc->element.key &&
|
if(
|
||||||
((CLEAN(event->state) == sc->element.mask) ||
|
event->keyval == sc->element.key
|
||||||
((sc->element.mask == 0) && (sc->element.key >= 0x21 && sc->element.key <= 0x7E))) &&
|
&& (CLEAN(event->state) == sc->element.mask || (sc->element.key >= 0x21
|
||||||
(Zathura.Global.mode & sc->element.mode || sc->element.mode == ALL) &&
|
&& sc->element.key <= 0x7E && event->state == GDK_SHIFT_MASK))
|
||||||
sc->element.function
|
&& (Zathura.Global.mode & sc->element.mode || sc->element.mode == ALL)
|
||||||
|
&& sc->element.function
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if(!(Zathura.Global.buffer && strlen(Zathura.Global.buffer->str)) ^
|
if(!(Zathura.Global.buffer && strlen(Zathura.Global.buffer->str)) || (sc->element.mask == GDK_CONTROL_MASK) ||
|
||||||
((sc->element.mask == GDK_CONTROL_MASK) || (sc->element.mask == GDK_MOD1_MASK)))
|
(sc->element.key <= 0x21 || sc->element.key >= 0x7E)
|
||||||
|
)
|
||||||
{
|
{
|
||||||
sc->element.function(&(sc->element.argument));
|
sc->element.function(&(sc->element.argument));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
Loading…
Reference in New Issue
Block a user