[wxPython-users] Re: fixed key bindings in notebook

AK andrei.avk at gmail.com
Tue Mar 18 13:57:36 PDT 2008


Franz Steinhäusler wrote:
> On Tue, 18 Mar 2008 12:08:20 -0700, Robin Dunn <robin at alldunn.com> wrote:
>
>   
>> Franz Steinhäusler wrote:
>>     
>>> Hello, in my app, I want to assign for the stc control:
>>> ctrl-page up ... for jump to document start
>>> ctrl-page down ... for jump to document end
>>>
>>>
>>> that keys seems to be fixed on changing the current notebook tabs.
>>> How can I disable that keys, so I can use it in my app?
>>> (I have my own hotkeys to change between the tabs of the notebook control with alt-cursor left and right).
>>>
>>> The same applies for ctrl-tab and ctr-shift-tab. I want to use that combinations for my own and not letting
>>> wxpyhton take control over those keys automatically.
>>>       
>> It's real hard to intercept the navigation keys before they get stolen 
>> for the navigation, mainly because they are caught before the focused 
>> window even sees the event.  You can try using EVT_KEY_DOWN or 
>> EVT_CHAR_HOOK on the notebook, or maybe EVT_NAVIGATION_KEY, then you can 
>> make a call from the handler back to the currently active page to do 
>> whatever you would have done from a normal key event in that class. 
>> Another option is to try using one of the non-native notebooks.
>>     
>
> Ok thanks, so it is not so trivial. I would like to use ctrl-page up in the stc to go
> to the top of the document for example. It seems to me more logical, than the
> ctrl-Pos1 or ctrl-home key.
>   
I need to do the same thing, in order to use ctrl-tab to cycle between 3 
areas of my program. If you figure this out,
please let me know. If I figure this out I will let you know. Thanks, -ak




More information about the wxpython-users mailing list