GithubHelp home page GithubHelp logo

Comments (16)

Tudmotu avatar Tudmotu commented on September 26, 2024

Interesting, thank you for reporting.

Is Control-F9 set to some other shortcut in you GNOME settings (Settings > Keyboard > Keyboard Shortcuts)?

from gnome-shell-extension-clipboard-indicator.

osamuaoki avatar osamuaoki commented on September 26, 2024

No.

FYI:
Where you use:

  │   │   │   │   let accelString = Gtk.accelerator_name(key, mods);
  │   │   │   │   SettingsSchema.set_strv(id, [accelString]);

In my extension in which I set shortcut, I use

  │   │   │   │   const binding = Gtk.accelerator_name_with_keycode(
  │   │   │   │   │   null,
  │   │   │   │   │   keyval,
  │   │   │   │   │   keycode,
  │   │   │   │   │   mask
  │   │   │   │   );
  │   │   │   │   // console.log(`  binding = ${binding}`);
  │   │   │   │   settings.set_strv(`${name}`, [binding]);

following practices of other extensions.

I don't suffer funny issue of ALT-F9.

from gnome-shell-extension-clipboard-indicator.

osamuaoki avatar osamuaoki commented on September 26, 2024

I mean Control-F9

from gnome-shell-extension-clipboard-indicator.

osamuaoki avatar osamuaoki commented on September 26, 2024

Here are links to similar shortcut setting extensions

from gnome-shell-extension-clipboard-indicator.

osamuaoki avatar osamuaoki commented on September 26, 2024

Hi, This is FYI (I may have found better reference code.)

I found

More specifically

This seems to be another one and follows exactly the same logic as C code:

I am thinking to follow gnome-control-center since it is most tested.

from gnome-shell-extension-clipboard-indicator.

Tudmotu avatar Tudmotu commented on September 26, 2024

FYI: Where you use:

  │   │   │   │   let accelString = Gtk.accelerator_name(key, mods);
  │   │   │   │   SettingsSchema.set_strv(id, [accelString]);

In my extension in which I set shortcut, I use

  │   │   │   │   const binding = Gtk.accelerator_name_with_keycode(
  │   │   │   │   │   null,
  │   │   │   │   │   keyval,
  │   │   │   │   │   keycode,
  │   │   │   │   │   mask
  │   │   │   │   );
  │   │   │   │   // console.log(`  binding = ${binding}`);
  │   │   │   │   settings.set_strv(`${name}`, [binding]);

Can you try implementing this is and opening a PR? 🙏

from gnome-shell-extension-clipboard-indicator.

osamuaoki avatar osamuaoki commented on September 26, 2024

I am a newbie javascript programmer and not familiar with ES5 style coding around Lang-thing. Since I just finish verifying the details using dummy extension code for my extension, let me wait a bit before creating PR.

I see bugs in the current gjs gdk for GTK4 document generation etc. I will work on them first.

from gnome-shell-extension-clipboard-indicator.

osamuaoki avatar osamuaoki commented on September 26, 2024

FYI: I was able to set back shortcut to Control-F9 etc. using dconf-editor. Basically, erase data for pertinent key there to get back to original default. This doesn't fix shortcut registration problem itself but useful trick to fix recorded data.

from gnome-shell-extension-clipboard-indicator.

SidonTheTroll avatar SidonTheTroll commented on September 26, 2024

Can I just know where the shortcuts are mentioned so that i can change them?

from gnome-shell-extension-clipboard-indicator.

Tudmotu avatar Tudmotu commented on September 26, 2024

@SidonTheTroll open the clipboard indicator, click on "settings" and at the bottom you can change the shortcuts:
image

from gnome-shell-extension-clipboard-indicator.

SidonTheTroll avatar SidonTheTroll commented on September 26, 2024

@Tudmotu Well, I meant in the config files. Even if I can't reset it to default (I'm running low on braincells), I can just assign another hotkeys.

from gnome-shell-extension-clipboard-indicator.

Tudmotu avatar Tudmotu commented on September 26, 2024

@SidonTheTroll not sure I understand. You can change it from the settings.
To edit a shortcut, click on the right where it says "Ctrl+F9" then insert the new shortcut.
To delete a shortcut press backspace.

There is no config file for the shortcuts.

from gnome-shell-extension-clipboard-indicator.

SidonTheTroll avatar SidonTheTroll commented on September 26, 2024

I get the point. Have been using another for weeks. Just wanted to go back to the original configs but can't assign ctrl any of the shortcut

from gnome-shell-extension-clipboard-indicator.

osamuaoki avatar osamuaoki commented on September 26, 2024

I used dconf-editor to erase the current custom setting to regain as-installed default.

from gnome-shell-extension-clipboard-indicator.

osamuaoki avatar osamuaoki commented on September 26, 2024

Go to /org/gnome/shell/extensions/clipboard-indicator/
Then to /org/gnome/shell/extensions/clipboard-indicator/toggle-menu

  • Click ERASE key button
  • Click Apply button

FYI: I am on GNOME on wayland

from gnome-shell-extension-clipboard-indicator.

Tudmotu avatar Tudmotu commented on September 26, 2024

Thank you @osamuaoki using some of your references I managed to re-implement the key binding interface.

It will be released & fixed as part of the GNOME 45 version.

If you'd like to help me test it out, it's available on the gnome45 branch (requires a system with GNOME 45.beta, e.g. GNOME OS via Boxes).

from gnome-shell-extension-clipboard-indicator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.