Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

We should be able to disable tool shortcuts #2649

Closed
jecisc opened this issue Feb 18, 2019 · 15 comments
Closed

We should be able to disable tool shortcuts #2649

jecisc opened this issue Feb 18, 2019 · 15 comments
Labels

Comments

@jecisc
Copy link
Member

jecisc commented Feb 18, 2019

Migrated case from Manuscript.

Original case: https://pharo.fogbugz.com/f/cases/17041
Status: Work Needed
Project: GTools
Original Author: CyrilFerlicot
Date: 18 November 2015 12:42:22 pm

Description:

For now we cannot disable GTSpotter.
An easy way to disable it and an entry inside the settings should be added.

@jecisc
Copy link
Member Author

jecisc commented Feb 18, 2019

Reply:
Author: CyrilFerlicot
Date: 18 November 2015 12:44:09 pm

Message:

We can add a classVariable, "IsEnable" to GTSpotter and change the action of the global shortcut to open it only if the variable is true.

@jecisc
Copy link
Member Author

jecisc commented Feb 18, 2019

Reply:
Author: Sven Van Caekenberghe
Date: 18 November 2015 12:50:31 pm

Message:

Aren't global keybindings managed by a key mapper or something like that ?
Could you not just remove the binding then ?

@jecisc
Copy link
Member Author

jecisc commented Feb 18, 2019

Reply:
Author: CyrilFerlicot
Date: 18 November 2015 1:22:17 pm

Message:

With the shortcut we can remove the shortcut but if we want to revert the change we have to reset KMRepository.
I think an other way that the shortcut would be better. (Or maybe there is a way to enable a global shortcut without a reset? I don't really know how works KM).

@jecisc
Copy link
Member Author

jecisc commented Feb 18, 2019

Reply:
Author: Abdelghani Alidra
Date: 18 December 2015 4:30:14 pm

Message:

By the way, how do you plan to disable the other shortcuts (e.g. Nautilus (CMD + O + N)) anyway.
It should be nice to have the same implementation for the spotter.

Vincent Blondeau & Thibault Raffaillac

@jecisc
Copy link
Member Author

jecisc commented Feb 18, 2019

Reply:
Author: Abdelghani Alidra
Date: 22 December 2015 11:48:03 pm

Message:

Hi,

Actually to disable GTSpotter shortcuts you need to remove the corresponding entry from KMRepository default grlobalCategories So :
KMRepository default globalCategories removeAllSuchThat: [ :each| each class = GTSpotterGlobalShortcut ].
Should do it.

You can also disable GTSpotter shurtcuts using ... a shortcut :)
for that just add a method in GTSpotterGlobalShortcuts associating a key combination to the disabling action. for example :

GTSpotterGlobalShortcuts >>keymapDisable

^ KMKeymap
shortcut: Character space shift
action:
[ SystemNavigation new inform: 'GTSpotter global Shortcuts disabled'.
self defaultShortcutsRepo remove: self ].

and another method in ToolShortcutsCategory to enable it back. someThing like :

ToolShortcutsCategory >>enableGTSpotterGlobalShortcut

^ KMKeymap
shortcut: Character tab shift
action: [ GTSpotterGlobalShortcut enableShortcuts ]

then, of Course, resetting KMRepository for the changes to take effect :
KMRepository reset.

Or just executing :

KMRepository default globalCategories removeAll.
KMRepository default globalCategories add: ToolShortcutsCategory new.

Then GTSpotter shortcuts are disabled.
Use Shift + tab to enable them and Shift + space for disabling.

Hope it helps.

Abdelghani

@jecisc
Copy link
Member Author

jecisc commented Feb 18, 2019

Reply:
Author: Tudor Girba
Date: 8 February 2016 3:00:23 pm

Message:

As @abdelghani pointed out, I think this is not a Spotter specific issue. Either we make this issue more generic and work on a new mechanism, or we close it. What do you think?

@jecisc
Copy link
Member Author

jecisc commented Feb 18, 2019

Reply:
Author: Nicolai Hess
Date: 8 February 2016 3:06:06 pm

Message:

+1 for close it.
We need a different way to make shortcuts configurabe / disable. I have an idea, needs some
changes on the shortcut / action definitions.

@jecisc
Copy link
Member Author

jecisc commented Feb 18, 2019

Reply:
Author: Tudor Girba
Date: 8 February 2016 3:06:53 pm

Message:

We close it for now.

@jecisc
Copy link
Member Author

jecisc commented Feb 18, 2019

Reply:
Author: Esteban Lorenzano
Date: 28 August 2016 7:52:34 am

Message:

reopen.

enable/disable a tool is not about how good is our shortcut mechanism, is about enabling and disabling tools. As I said in list... also remove the shortcut would be an incomplete disable because we need also to remove the worldmenu entry.

so, better implement a enable setting as all other GTTools than waiting for a perfect solution that we don't know when will arrive (and that is also not a complete answer).

@jecisc
Copy link
Member Author

jecisc commented Feb 18, 2019

Reply:
Author: Tudor Girba
Date: 4 September 2016 6:19:17 pm

Message:

It is important to be able to remove tools from the top level, but doing it at the Spotter level is not really useful because Spotter is not the only tool that is registered globally. We have about 8 more other shortcuts. There is no point in single-ing out only one tool because it will not solve the original problem of deploying a desktop application.

Furthermore, the issue is that right now global shortcuts are described statically, so I do not know how a reliable disabling mechanism would look like given the current design of Keymapping.  Please take a look at the shortcuts and propose a concrete solution.

@jecisc
Copy link
Member Author

jecisc commented Feb 18, 2019

Reply:
Author: Marcus Denker
Date: 27 January 2017 12:19:26 pm

Message:

not specific to Pharo5. --> Later

@stale
Copy link

stale bot commented Aug 17, 2019

To limit bug bankruptcy (see https://www.joelonsoftware.com/2012/07/09/software-inventory/) this issue has been automatically marked as stale because it has not had any activity in 6 months. It will be closed in 1 month if no further activity occurs. If this issue remains important to you, please comment to reactivate the issue. Thank you for your contributions.

Joel on Software
Imagine, for a moment, that you came upon a bread factory for the first time. At first it just looks like a jumble of incomprehensible machinery with a few people buzzing around. As your eyes adjus…

@stale stale bot added the stale label Aug 17, 2019
@jecisc
Copy link
Member Author

jecisc commented Aug 17, 2019

Still relevent.

@stale stale bot removed the stale label Aug 17, 2019
@guillep guillep changed the title We should be able to disable GTSpotter. We should be able to disable tool shortcuts Mar 30, 2020
@guillep
Copy link
Member

guillep commented Mar 30, 2020

Right now all shortcuts are hardcoded and handed by the world. This is a problem in apps like the Pharo launcher. We should probably rethink the world metaphore also.

@guillep
Copy link
Member

guillep commented Jan 27, 2023

This is a pretty big "issue", not easily actionable, more like a big feature project.
But if nobody actively works on it, it would be nicer to move it maybe to a wiki page with project ideas.

@guillep guillep closed this as completed Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants