Changed the way Paste keybind works in Composer #488
Merged
+16
−13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As it is, the Paste keybind in Composer's attachment page relies on
Gdk.Key.*
andkeyval
s. But as it turns out, that makes alphabetical keys based keybinds not work at all on non-latin layouts (which i am a user of), or shift around on layouts that aren't default QWERTY. And while that makes sense for, say, Dvorak, for Cyrillic it makes the users like me switch to a different keyboard layout just to paste an image. Which, again, is against Gnome's principles. So, I did the only right thing that came to my mind, and added anif
that also checks forkeycode
- so pressing Ctrl+cyrillic М or Ctrl+whatever-is-in-the-place-of-V will also paste the image. Keeping the keyval approach because of all those poor Dvorak people who think about what keys they press and not where they are located.P. S. This is my first pull request. No, really, I've just figured out how to
git push
an hour ago. Probably would be a good idea to do something like this for other keybinds?