mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-13 07:23:45 +01:00
Update shortcut detection
This commit is contained in:
parent
97356fed47
commit
fcceffa973
12
zathura.c
12
zathura.c
@ -3462,6 +3462,9 @@ cc_set(char* input)
|
|||||||
void
|
void
|
||||||
bcmd_goto(char* buffer, Argument* argument)
|
bcmd_goto(char* buffer, Argument* argument)
|
||||||
{
|
{
|
||||||
|
if(!Zathura.PDF.document)
|
||||||
|
return;
|
||||||
|
|
||||||
int b_length = strlen(buffer);
|
int b_length = strlen(buffer);
|
||||||
if(b_length < 1)
|
if(b_length < 1)
|
||||||
return;
|
return;
|
||||||
@ -3870,10 +3873,11 @@ 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->state == sc->element.mask
|
if( event->keyval == sc->element.key &&
|
||||||
&& event->keyval == sc->element.key
|
((event->state == sc->element.mask) ||
|
||||||
&& (Zathura.Global.mode == sc->element.mode || sc->element.mode == -1)
|
((sc->element.mask == 0) && (sc->element.key >= 20 && sc->element.key <= 126))) &&
|
||||||
&& sc->element.function
|
(Zathura.Global.mode == sc->element.mode || sc->element.mode == -1) &&
|
||||||
|
sc->element.function
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
sc->element.function(&(sc->element.argument));
|
sc->element.function(&(sc->element.argument));
|
||||||
|
Loading…
Reference in New Issue
Block a user