maoschanz / emoji-selector-for-gnome

This extension provide a popup menu with some emojis ; clicking on an emoji copies it to the clipboard.
GNU General Public License v3.0
470 stars 76 forks source link

Alternative modifier keys don't work #169

Closed theCalcaholic closed 1 year ago

theCalcaholic commented 2 years ago

System

Description of the bug

Is your bug already reported? [y/n]: n

When using a different modifier key in the keyboard shortcut (i.e. other than <Super>) it will be ignored, meaning the shortcut will work as if the modifier wasn't there (e.g. if setting the shortcut to <Shift_L>e the emoji picker will open when pressing just e, but not when pressing Left Shift + e).

To Reproduce

Steps to reproduce the bug:

  1. Install the emoji selector extension
  2. Set the keyboard shortcut in the extension settings to something like <Control_L>e or <Shift_L>e.
  3. Attempt to open the emoji picker via shortcut

Expected behavior

When pressing the configured shortcut, the emoji picker should open. It should not open on any other key combinations.

maoschanz commented 1 year ago

What makes you think these values should be recognized by the Mutter window manager? I don't know where the doc is located, but if i remember correctly, the valid ones are Ctrl, Primary, Hyper, Super, Meta, Shift, and something for the lock key. And of course you want to avoid shortcuts related to only ctrl or/and shift because those are used by applications themselves

markcellus commented 1 year ago

@maoschanz same thing just happened to me 😄

What makes you think these values should be recognized by the Mutter window manager?

On Ubuntu, when clicking the "?" next to the shortcuts field, it shows a "List of valid key names" link (in image below) that links to https://github.com/GNOME/gtk/blob/main/gdk/keynames.txt. That page lists Control_L, Shift_L, etc like @theCalcaholic mentioned. If that link shouldn't be used, it may be good to just remove it or update the reference to a more reliable set of key names.

maoschanz commented 1 year ago

oh my bad, i now understand the source of the confusion: this list is valid, but it's for the keys themselves, for example it's not <Super>. as you may think instinctively, but <Super>period instead like in the list

concerning the modifiers themselves, i still don't know where they're documented, but anyway shift+[random key] will just type the uppercase version of that random key, so it's not valid: a better attempt would be super+shift+that key, or ctrl+shift+that key

but when i'll have a computer to resume development i want to use the gtk4 dialog to ask for a key combination like they do in the system settings