# Keyboard only menus

**URL:** <https://www.ruby-forum.com/t/keyboard-only-menus/188908>\
**Category:** wxRuby\
**Created:** [May 20, 2010, 10:15am UTC](https://www.ruby-forum.com/t/keyboard-only-menus/188908 "2010-05-20T10:15:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DunlopS\_Andrew](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/76d3ee/32.png) [@DunlopS\_Andrew](https://www.ruby-forum.com/u/DunlopS_Andrew)\
**Post date:** [May 20, 2010, 10:15am UTC](https://www.ruby-forum.com/t/keyboard-only-menus/188908/1 "2010-05-20T10:15:22Z")

</div>

Hello all,

I have a popup menu which I want to only be controllable using keyboard  
(actually it’s a games controller mapped to key presses, but that’s not  
important).

I’m not sure it would be possible to restrict menus like that but  
thought I would ask the question just in case.

Thanks,

Andrew

* * *

Andrew Dunlop MEng(Hons) MIET  
Engineer

Tel: +44 (0)1794 833441  
removed\_email\_address@domain.invalid

–  
Roke Manor Research Ltd, Romsey,  
Hampshire, SO51 0ZN, United Kingdom

## A Siemens company Registered in England & Wales at: Siemens plc, Faraday House, Sir William Siemens Square, Frimley, Camberley, GU16 8QD. Registered No: 267550

## Visit our website at [www.roke.co.uk](http://www.roke.co.uk)

## The information contained in this e-mail and any attachments is proprietary to Roke Manor Research Ltd and must not be passed to any third party without permission. This communication is for information only and shall not create or change any contractual relationship.

Please consider the environment before printing this email  
~

---

<div class="post-metadata">

**Author:** ![DunlopS\_Andrew](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/76d3ee/32.png) [@DunlopS\_Andrew](https://www.ruby-forum.com/u/DunlopS_Andrew)\
**Post date:** [May 21, 2010, 3:00pm UTC](https://www.ruby-forum.com/t/keyboard-only-menus/188908/2 "2010-05-21T15:00:04Z")

</div>

hi Andrew

Dunlop, Andrew wrote:

> I have a popup menu which I want to only be controllable using  
> keyboard (actually it’s a games controller mapped to key presses, but  
> that’s not important).
> 
> I’m not sure it would be possible to restrict menus like that but  
> thought I would ask the question just in case.

Not sure I understand 100% - but Wx::AcceleratorTable offers a concise  
way to define keyboard shortcuts for a Frame etc. But using a normal  
desktop context menu would kind of imply control by mouse or keyboard,  
no? Unless you hide the mouse pointer, somehow?

cheers  
alex

---

<div class="post-metadata">

**Author:** ![DunlopS\_Andrew](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/76d3ee/32.png) [@DunlopS\_Andrew](https://www.ruby-forum.com/u/DunlopS_Andrew)\
**Post date:** [May 25, 2010, 3:32pm UTC](https://www.ruby-forum.com/t/keyboard-only-menus/188908/3 "2010-05-25T15:32:23Z")

</div>

Alex F. wrote:

> hi Andrew
> 
> Dunlop, Andrew wrote:
> 
> > I have a popup menu which I want to only be controllable using  
> > keyboard (actually itï¿½s a games controller mapped to key presses, but  
> > thatï¿½s not important).
> > 
> > Iï¿½m not sure it would be possible to restrict menus like that but  
> > thought I would ask the question just in case.
> 
> Not sure I understand 100% - but Wx::AcceleratorTable offers a concise  
> way to define keyboard shortcuts for a Frame etc. But using a normal  
> desktop context menu would kind of imply control by mouse or keyboard,  
> no? Unless you hide the mouse pointer, somehow?
> 
> cheers  
> alex

I am using a pointer mapped to a controller joystick and then when the  
menu pops up I want to navigate the menu using the D-pad as this is  
easier.
