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

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
User avatar
LazY Puppy
Posts: 1934
Joined: Fri 21 Nov 2014, 18:14
Location: Germany

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

#1 Post 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.
Last edited by LazY Puppy on Sun 29 Mar 2015, 04:39, edited 1 time in total.
RSH

"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:

No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#2 Post 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.

User avatar
LazY Puppy
Posts: 1934
Joined: Fri 21 Nov 2014, 18:14
Location: Germany

#3 Post 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. :)
RSH

"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:

No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:

Post Reply