Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor folder navigation to use css keybindings #17

Open
Bios-Marcel opened this issue Dec 23, 2018 · 0 comments
Open

Refactor folder navigation to use css keybindings #17

Bios-Marcel opened this issue Dec 23, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@Bios-Marcel
Copy link
Owner

Taken from GIMPNet IRC:

<marcel> Heyho, can anybody tell me how to prevent a widget from consuming a specific key event? I have a TreeView and it consumes the events of the keys "Left" and "Right".
<albfan[m]> marcel: you need to override keyevent managing and return false on those keys
<marcel> How'd I do that? I was looking the documentation for Gtk.Widget and couldn't find anything like thta.
<al> marcel: i think https://valadoc.org/gtk+-3.0/Gtk.Widget.event.html is worth a try
<marcel> I see, thanks, I shall take a look at that.
<al> and https://valadoc.org/gtk+-3.0/Gtk.Widget.key_press_event.html
<marcel> Well that's the event, I can't override anything in the event itself, right?
<marcel> I thought a signal doesn't have any logic, it's basically just a connector
<al> in you class you want something like: public override signal bool key_press_event (EventKey event) { return false; }
<al> if that works for all keys then write some more code just to file left and right
<al> *filter
<al> oh and drop the signal, public override bool key_press_event (EventKey event) { return false; }
<al> i'm probably getting confused, you want key_press_event.connect, but have a look at https://wiki.gnome.org/Projects/Vala/SignalsAndCallbacks
@Bios-Marcel Bios-Marcel added the enhancement New feature or request label Dec 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant