-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
I actually thought Immerse did not support pan/zoom until I saw Tim's YouTube video.
The problem is that GtkUtilities.jl is not properly masking for modifier keys that are considered "significant".
I had to replace:
keymatch(event, keydesc) = event.keyval == keydesc[1] && event.state == UInt32(keydesc[2])
With the following:
function gtk_accelerator_get_default_mod_mask()
ccall((:gtk_accelerator_get_default_mod_mask,Gtk.libgtk),Cint,())
end
keymatch(event, keydesc) = event.keyval == keydesc[1] &&
(event.state>k_accelerator_get_default_mod_mask()) == UInt32(keydesc[2])
Now, I can zoom even if my NumLock key is on... but similar masking would also be necessary on the mouse operations.
Comments
- I did not make a PR because my guess is that
accelerator_get_default_mod_mask()
should be in Gtk.jl - and someone that better understands the Gtk.jl naming convention should probably be adding it. - Note that
gtk_accelerator_set_default_mod_mask()
is only supposed to be set at "application startup" - which I believe means it could potentially be stored as aconst
while "loading" Gtk.jl (Not sure how this would work out, though).
Metadata
Metadata
Assignees
Labels
No labels