Empyreus / lanterna

Automatically exported from code.google.com/p/lanterna
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Support for keyboard shortcuts to buttons would be really useful #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Keyboard shortcuts to invoke action buttons will save a lot of tabbing and 
moving around the screen to invoke a button.

Original issue reported on code.google.com by m.vino...@gmail.com on 11 Jul 2012 at 5:41

GoogleCodeExporter commented 9 years ago
Yes, that's a pretty good idea. I'll see how easy it would be to implement.

Original comment by mab...@gmail.com on 11 Jul 2012 at 11:58

GoogleCodeExporter commented 9 years ago
You should look at the key handling in JCurses. Each Widget has a handleInput 
method that returns true if the Widget actually handled the input, allowing it 
to bubble up the stack. That type of arrangement would make it easy to 
implement shortcut keys.

Original comment by bem...@gmail.com on 30 Aug 2012 at 6:41

GoogleCodeExporter commented 9 years ago
I've added an extra enum value so that components can declare if they have 
handled the event or not, at the moment you can only catch unhandled events by 
registering a listener on the window but I think there should be a way to catch 
them further down the hierarchy too.

Original comment by mab...@gmail.com on 1 Sep 2012 at 2:40

GoogleCodeExporter commented 9 years ago
This is now done, you can register shortcuts on any container component. Pushed 
and deployed.

Original comment by mab...@gmail.com on 16 Sep 2012 at 2:07