Maybe you can derive a class my-list-box% from list-box% and catch the
`on-subwindow-char` event:
http://docs.racket-lang.org/gui/window___.html#%28meth._%28%28%28lib._mred%2Fmain..rkt%29._window~3c~25~3e%29._on-subwindow-char%29%29

and then manually trigger the same callback as the button (it's better to
create a separate function instead of directly calling the button's
callback).

Laurent

On Wed, Jun 10, 2015 at 11:04 AM, mazert <rom...@elgeekador.net> wrote:

> Hello,
>
> I know we can assign a keyboard shortcut on a menu%, but I try to do the
> same thing with a button%. Is that possible ?
>
> In my case : I have a list-box% and a "Delete button", I want that when I
> press "DEL" key on my keyboard, it deletes the selected item in the
> list-box%.
>
> Thanks in advance.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to