Page 1 of 1

(Solved) Keyboard Commands for Page Down & Page Up buttons?

Posted: Sun 29 Mar 2015, 03:21
by LazY Puppy
Hi.

I'm using keybord commands in a gtkdialog gui to scroll through a list of images.
<action signal="key-release-event" condition="command_is_true([ $KEY_SYM = Up ] && echo true )">funcSwitchImgPreview</action>
<action signal="key-release-event" condition="command_is_true([ $KEY_SYM = Up ] && echo true )">refresh:PIXMAP</action>
<action signal="key-release-event" condition="command_is_true([ $KEY_SYM = Down ] && echo true )">funcSwitchImgPreview</action>
<action signal="key-release-event" condition="command_is_true([ $KEY_SYM = Down ] && echo true )">refresh:PIXMAP</action>
But this is only for scrolling entries one after another.

What would I need to use to scroll them at pages?

Below code doesn't seem to work:
<action signal="key-release-event" condition="command_is_true([ $KEY_SYM = PageUp ] && echo true )">funcSwitchImgPreview</action>
<action signal="key-release-event" condition="command_is_true([ $KEY_SYM = PageUp ] && echo true )">refresh:PIXMAP</action>
<action signal="key-release-event" condition="command_is_true([ $KEY_SYM = PageDown ] && echo true )">funcSwitchImgPreview</action>
<action signal="key-release-event" condition="command_is_true([ $KEY_SYM = PageDown ] && echo true )">refresh:PIXMAP</action>
I'm searching for the parts/commands marked up.

Thanks.

Posted: Sun 29 Mar 2015, 04:16
by MochiMoppel
A bit strange. xev identifies the Pageup and PageDown keys as Prior and Next, but $KEY_SYM = Prior doesn't work for me. Instead $KEY_VAL = 0xff55 works fine. For PageDown this would be $KEY_VAL = 0xff56.

Posted: Sun 29 Mar 2015, 04:38
by LazY Puppy
Wow man, that's pretty cool. You're an Expert.

I had already used xev to get the code for Up and Down, but it didn't work. Then clear command "Escape" did come to my mind so I did try just to use Up and Down, which worked immediately. Since xev code for Up and Down didn't work I did not try it again for PageUp and PageDown.

However, I just wasn't aware of the use of $KEY_VAL instead of $KEY_SYM.

Of course you're an expert - at least more than me one.

Thank you very much. :)