Discussion:
Default keyboard shortcuts (accelerators) on some widgets
d***@gmail.com
2014-09-10 10:09:01 UTC
Permalink
I'm in the process of migrating a TreeCtrl to a DataViewCtrl, but I've
noticed that DataViewCtrl has some predefined accelerators (keyboard
shortcuts) that override those set for some main menu items only when the
control is focused. In particular I've found Ctrl+f (opens a text search
that by the way works in the demo but not in my implementation) and Ctrl+n
(which only seems to move the focus down in the rows of items). TreeCtrl
itself was responding to letter and number keys in a sort of live text
search.

My question is: are these shortcuts documented somewhere (also possibly for
other widgets)? I would like to ensure my menu shortcuts work regardless of
where the focus is, and I wouldn't like to test each of them (they are
dozens) on each widget (still dozens, which makes hundreds of possible
combinations), and remember to do it every time I add a shortcut or a
widget, so having a comprehensive list would let me know what key
combinations to avoid.

Then, is there a way of disabling default accelerators in general? If not,
what is the recommended way to override them one by one?

Thank you
Dario
--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Werner
2014-09-10 11:16:18 UTC
Permalink
Hi Dario,
Post by d***@gmail.com
I'm in the process of migrating a TreeCtrl to a DataViewCtrl, but I've
noticed that DataViewCtrl has some predefined accelerators (keyboard
shortcuts) that override those set for some main menu items only when
the control is focused. In particular I've found Ctrl+f (opens a text
search that by the way works in the demo but not in my implementation)
I think this is wxPython demo shortcut and not specific to the
TreeCtrl. If you press ctrl+f the focus goes to the Demo Code tab and
you search within the code.

Werner
--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
d***@gmail.com
2014-09-10 11:22:26 UTC
Permalink
Post by Werner
Hi Dario,
Post by d***@gmail.com
I'm in the process of migrating a TreeCtrl to a DataViewCtrl, but I've
noticed that DataViewCtrl has some predefined accelerators (keyboard
shortcuts) that override those set for some main menu items only when
the control is focused. In particular I've found Ctrl+f (opens a text
search that by the way works in the demo but not in my implementation)
I think this is wxPython demo shortcut and not specific to the
TreeCtrl. If you press ctrl+f the focus goes to the Demo Code tab and
you search within the code.
Werner
Hi Werner,

I'm talking about the DVC_DataViewModel demo: make sure an item in the list
is focused and then press Ctrl+f: the internal widget search will appear
(in the bottom-right corner), not the Demo Code tab one.
--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Werner
2014-09-10 11:32:54 UTC
Permalink
Post by Werner
Hi Dario,
Post by d***@gmail.com
I'm in the process of migrating a TreeCtrl to a DataViewCtrl,
but I've
Post by d***@gmail.com
noticed that DataViewCtrl has some predefined accelerators
(keyboard
Post by d***@gmail.com
shortcuts) that override those set for some main menu items only
when
Post by d***@gmail.com
the control is focused. In particular I've found Ctrl+f (opens a
text
Post by d***@gmail.com
search that by the way works in the demo but not in my
implementation)
I think this is wxPython demo shortcut and not specific to the
TreeCtrl. If you press ctrl+f the focus goes to the Demo Code tab and
you search within the code.
Werner
Hi Werner,
I'm talking about the DVC_DataViewModel demo: make sure an item in the
list is focused and then press Ctrl+f: the internal widget search will
appear (in the bottom-right corner), not the Demo Code tab one.
Hhm, not for me, I am on Windows with wxPython 3.0 classic or 3.0.1 Phoenix

What version of wxPython are you using and on what platform?

Werner
--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Dario Giovannetti
2014-09-10 11:42:41 UTC
Permalink
Post by Werner
Post by Werner
Hi Dario,
Post by d***@gmail.com
I'm in the process of migrating a TreeCtrl to a DataViewCtrl,
but I've
Post by d***@gmail.com
noticed that DataViewCtrl has some predefined accelerators
(keyboard
Post by d***@gmail.com
shortcuts) that override those set for some main menu items
only when
Post by d***@gmail.com
the control is focused. In particular I've found Ctrl+f (opens
a text
Post by d***@gmail.com
search that by the way works in the demo but not in my
implementation)
I think this is wxPython demo shortcut and not specific to the
TreeCtrl. If you press ctrl+f the focus goes to the Demo Code tab and
you search within the code.
Werner
Hi Werner,
I'm talking about the DVC_DataViewModel demo: make sure an item in
the list is focused and then press Ctrl+f: the internal widget search
will appear (in the bottom-right corner), not the Demo Code tab one.
Hhm, not for me, I am on Windows with wxPython 3.0 classic or 3.0.1 Phoenix
What version of wxPython are you using and on what platform?
Werner
--
You received this message because you are subscribed to a topic in the
Google Groups "wxPython-users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/wxpython-users/1sUPp766uXU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
For more options, visit https://groups.google.com/d/optout.
Uh I'm on Linux/GTK 2.24, I'm starting to think that it's a shortcut of
the native GTK widget, however I've tested it on a native GTK
application that uses a tree control, and Ctrl+f does show the same text
search, but for example Ctrl+n normally activates the associated menu
item (open a new window).
--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Dario Giovannetti
2014-09-10 11:43:34 UTC
Permalink
Post by Dario Giovannetti
Post by Werner
Post by Werner
Hi Dario,
Post by d***@gmail.com
I'm in the process of migrating a TreeCtrl to a DataViewCtrl,
but I've
Post by d***@gmail.com
noticed that DataViewCtrl has some predefined accelerators
(keyboard
Post by d***@gmail.com
shortcuts) that override those set for some main menu items
only when
Post by d***@gmail.com
the control is focused. In particular I've found Ctrl+f (opens
a text
Post by d***@gmail.com
search that by the way works in the demo but not in my
implementation)
I think this is wxPython demo shortcut and not specific to the
TreeCtrl. If you press ctrl+f the focus goes to the Demo Code tab and
you search within the code.
Werner
Hi Werner,
I'm talking about the DVC_DataViewModel demo: make sure an item in
the list is focused and then press Ctrl+f: the internal widget
search will appear (in the bottom-right corner), not the Demo Code
tab one.
Hhm, not for me, I am on Windows with wxPython 3.0 classic or 3.0.1 Phoenix
What version of wxPython are you using and on what platform?
Werner
--
You received this message because you are subscribed to a topic in
the Google Groups "wxPython-users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/wxpython-users/1sUPp766uXU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
For more options, visit https://groups.google.com/d/optout.
Uh I'm on Linux/GTK 2.24, I'm starting to think that it's a shortcut
of the native GTK widget, however I've tested it on a native GTK
application that uses a tree control, and Ctrl+f does show the same
text search, but for example Ctrl+n normally activates the associated
menu item (open a new window).
...and I'm using wxPython 3.0.1 Phoenix
--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Nathan McCorkle
2014-09-10 17:43:34 UTC
Permalink
Post by Werner
Post by d***@gmail.com
the control is focused. In particular I've found Ctrl+f (opens a text
search that by the way works in the demo but not in my implementation)
I think this is wxPython demo shortcut and not specific to the
TreeCtrl. If you press ctrl+f the focus goes to the Demo Code tab and
you search within the code.
When I open the demo directly, i.e. not through Main.py I don't get any
ctrl-f or ctrl-n actions happening.
I tried with 2.9.4, 3.0.0 and 3.0.1 all MSW all Classic all on Win7
--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Dario Giovannetti
2014-09-14 10:52:24 UTC
Permalink
Post by d***@gmail.com
Post by d***@gmail.com
the control is focused. In particular I've found Ctrl+f (opens a
text
Post by d***@gmail.com
search that by the way works in the demo but not in my
implementation)
I think this is wxPython demo shortcut and not specific to the
TreeCtrl. If you press ctrl+f the focus goes to the Demo Code tab and
you search within the code.
When I open the demo directly, i.e. not through Main.py I don't get
any ctrl-f or ctrl-n actions happening.
I tried with 2.9.4, 3.0.0 and 3.0.1 all MSW all Classic all on Win7
--
You received this message because you are subscribed to a topic in the
Google Groups "wxPython-users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/wxpython-users/1sUPp766uXU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
For more options, visit https://groups.google.com/d/optout.
Thank you, I'm positive now that this behaviour comes from the native
GTK widget that is used by the DataViewCtrl; by the way, also Ctrl+p
(previous) is taken by the widget.

I may have found a hack to disable at least Ctrl+f, but I've opened
another thread for that because I have a more generic question about it:
https://groups.google.com/d/msg/wxpython-users/4nsv7x1DE-s/ljQHl9RTnuEJ
--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...