Re: [Vala] keybinding in vala
- From: Max <maxim suraev campus tu-berlin de>
- To: Gilzad Hamuni <gilli4 gmx net>, vala-list gnome org
- Subject: Re: [Vala] keybinding in vala
- Date: Wed, 23 Apr 2014 15:07:21 +0200
Thanks for answer! Some comments below.
23.04.2014 14:45, Gilzad Hamuni пишет:
public SomeCtor()
{
textView.key_press_event.connect(OnKeyPressed);
}
Where should I plug this if I want ap-wide keybindings? For example I have a gtk app
with menu, couple of toolbars and status bar and gtk.notebook. Shall I call
.key_press_event.connect() for toolbar? notebook? something else?
bool OnKeyPressed(Widget source, Gdk.EventKey eventKey)
{
if( ( (eventKey.state & Gdk.ModifierType.CONTROL_MASK) != 0) && (eventKey.hardware_keycode == 28) )
Where does 28 comes from? I'd like to avoid hardcoding if possible. Also, what about
i18n? Will it work with non-English keyboard layout?
cheers,
Max.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]