forge icon indicating copy to clipboard operation
forge copied to clipboard

feat: options to disable shortcuts

Open realgrm opened this issue 2 years ago • 15 comments

Is your feature request related to a problem? Please describe. Some of the app's keyboard shortcuts overrides some of my personal shortcuts.

Describe the solution you'd like Since I don't use any of the extension's shortcuts, it would be bettor to have:

  • an option to disable all shortcuts
  • an option to restore the defaults (for those who need it)
  • when a shortcut is in blank, it gets disabled

Describe alternatives you've considered

Additional context

  • Fedora Silverblue 37
  • gnome-shell-43.1-4.fc37.x86_64
  • Forge version 60

realgrm avatar Dec 11 '22 02:12 realgrm

Hi @realgrm - can you specify what shortcuts are conflicting with your system?

jmmaranan avatar Dec 11 '22 12:12 jmmaranan

Hi @jmmaranan, mostly personal shortcuts using the Meta key, e.g. Meta+L, Meta+W...

But what I meant is that, as far as I'm concerned, there's no option to deactivate a shortcut. So, I have to create a random shortcut to a function that I'm not going to use right now.

And by creating this random shortcut I have to think if this new shortcut is going to overwrite another used by the system or other app, or other that I'm might use in the future. Remember that I'm not going to use it for this extension anyway.

Oh, and thanks for the extension btw, I'm waiting for a tilling like this on Gnome on Wayland for a long time.

realgrm avatar Dec 13 '22 00:12 realgrm

Actually, I tested right now to set another shortcut (tested <Super>. and <Super>f) to a function in the 'Window shortcut' and 'Other shortcuts' section and it didn't save. I left and return the extension preferences and the default was still set.

realgrm avatar Dec 13 '22 00:12 realgrm

@realgrm As described on the top of the window, you need to press Return to save changes (both setting a new shortcut or deleting it): image

abmantis avatar Dec 19 '22 00:12 abmantis

@abmantis my bad. In a hurry I ended up not reading @jmmaranan sorry for the waste of time.

realgrm avatar Dec 23 '22 23:12 realgrm

Hi! I think this is still a good enhancement. Given how unintuitive the current experience is.

jmmaranan avatar Dec 24 '22 02:12 jmmaranan

I second this proposal. I have a bunch of custom shortcuts on my Gnome desktop and installing Forge overides all of them. It's not hard to manually edit/delete Forge keyboard shortcuts, but a switch to disable all at once would be nice.

FelixFourcolor avatar Apr 13 '23 11:04 FelixFourcolor

It would be even better if shortcuts are disable by default. This ensures no pre-existing shortcuts are broken, and user can assign their own shortcuts after installing.

FelixFourcolor avatar Apr 13 '23 12:04 FelixFourcolor

Yeah, keybinding conflict detection is needed so that Forge will leave it alone. See #37. Otherwise, I initially intended it to be keyboard driven by design so shortcuts would always be enabled, I compromised by making it easy for users to change rather than fight it. I'll see if #37 would be feasible to do next few weeks

jmmaranan avatar Apr 13 '23 12:04 jmmaranan

At the top, it is written: "Delete text to unset". But if I delete the text, press return (Enter key) and close the window, it gets reset to the default shortcut.

puspamadak avatar Jun 01 '23 08:06 puspamadak

Hi @puspamadak, thanks for the report - assuming you were using the latest v69?

If you are, we introduced the Adwaita Preferences and looks like need more polish and testing. But we will roll forward with it, for now, I disabled that version while we sort it out in the next couple of days.

jmmaranan avatar Jun 01 '23 11:06 jmmaranan

@puspamadak - this was caused by the Adwaita update for prefs. I added a PR here. https://github.com/forge-ext/forge/pull/240

jmmaranan avatar Jun 01 '23 23:06 jmmaranan

In case it is helpful for anyone: all shortcuts can be disabled from the command line. You can also see the current shortcuts, and set them. See below.

Disable all:

FORGE="$HOME/.local/share/gnome-shell/extensions/[email protected]/schemas/"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings con-split-horizontal "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings con-split-layout-toggle "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings con-split-vertical "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings con-stacked-layout-toggle "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings con-tabbed-layout-toggle "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings con-tabbed-showtab-decoration-toggle "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings focus-border-toggle "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings prefs-open "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings prefs-tiling-toggle "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-focus-down "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-focus-left "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-focus-right "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-focus-up "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-gap-size-decrease "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-gap-size-increase "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-move-down "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-move-left "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-move-right "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-move-up "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-resize-bottom-decrease "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-resize-bottom-increase "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-resize-left-decrease "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-resize-left-increase "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-resize-right-decrease "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-resize-right-increase "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-resize-top-decrease "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-resize-top-increase "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-snap-center "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-snap-one-third-left "['']"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-snap-one-third-right "['']"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-snap-two-third-left "['']"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-snap-two-third-right "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-swap-down "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-swap-last-active "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-swap-left "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-swap-right "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-swap-up "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-toggle-always-float "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-toggle-float "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings workspace-active-tile-toggle "[]"

List all:

FORGE="$HOME/.local/share/gnome-shell/extensions/[email protected]/schemas/"
gsettings --schemadir $FORGE list-recursively org.gnome.shell.extensions.forge.keybindings

Set shortcut:

E.g. both Super+a and Super+b to con-split-horizontal:

FORGE="$HOME/.local/share/gnome-shell/extensions/[email protected]/schemas/"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings con-split-horizontal "['<Super>a','<Super>b']"

humanplayer2 avatar Sep 11 '23 09:09 humanplayer2

  • an option to disable all shortcuts

@jmmaranan Seems liek this would be quick to implement because it took me like a minute to manually remove all shortcuts through the UI

moritztim avatar Nov 06 '23 15:11 moritztim

In case it is helpful for anyone: all shortcuts can be disabled from the command line. You can also see the current shortcuts, and set them. See below.

Disable all:

FORGE="$HOME/.local/share/gnome-shell/extensions/[email protected]/schemas/"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings con-split-horizontal "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings con-split-layout-toggle "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings con-split-vertical "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings con-stacked-layout-toggle "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings con-tabbed-layout-toggle "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings con-tabbed-showtab-decoration-toggle "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings focus-border-toggle "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings prefs-open "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings prefs-tiling-toggle "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-focus-down "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-focus-left "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-focus-right "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-focus-up "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-gap-size-decrease "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-gap-size-increase "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-move-down "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-move-left "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-move-right "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-move-up "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-resize-bottom-decrease "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-resize-bottom-increase "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-resize-left-decrease "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-resize-left-increase "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-resize-right-decrease "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-resize-right-increase "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-resize-top-decrease "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-resize-top-increase "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-snap-center "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-snap-one-third-left "['']"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-snap-one-third-right "['']"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-snap-two-third-left "['']"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-snap-two-third-right "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-swap-down "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-swap-last-active "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-swap-left "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-swap-right "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-swap-up "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-toggle-always-float "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings window-toggle-float "[]"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings workspace-active-tile-toggle "[]"

List all:

FORGE="$HOME/.local/share/gnome-shell/extensions/[email protected]/schemas/"
gsettings --schemadir $FORGE list-recursively org.gnome.shell.extensions.forge.keybindings

Set shortcut:

E.g. both Super+a and Super+b to con-split-horizontal:

FORGE="$HOME/.local/share/gnome-shell/extensions/[email protected]/schemas/"
gsettings --schemadir $FORGE set org.gnome.shell.extensions.forge.keybindings con-split-horizontal "['<Super>a','<Super>b']"

If you have installed the extension as sudo, from the fedora repositories for example, this file doesn't exist; at least I can't find it with locate [email protected] | grep schema ...

gerelef avatar Nov 07 '23 15:11 gerelef