atj393 / promt-save-reuse-chatgpt-and-gemini

A browser extension for saving, reusing, and managing prompts in ChatGPT and Gemini.
https://github.com/atj393/promt-save-reuse-chatgpt-and-gemini/wiki/Download-Links
Other
4 stars 15 forks source link

[Enhancement] Implement a Custom Command Palette for Extension Commands #17

Closed atj393 closed 1 month ago

atj393 commented 1 month ago

Description:

Add a custom command palette accessible via a keyboard shortcut (e.g., Ctrl+Shift+P) to quickly execute extension commands like save, append, or clear data.

Files Involved:

background.js, popup.html

Expected Outcome:

Users should be able to access extension commands via a custom command palette, improving usability and accessibility.

ASANIYAN commented 1 month ago

Hello, please assign this issue to me.

Also, what keyboard shortcut would you want to use to handle save, append and clear data functionalities?

atj393 commented 1 month ago

@ASANIYAN Assigned. Thanks.

What are your suggestions? we can do a small brainstorming here.

ASANIYAN commented 1 month ago

The ideal scenario would be to use Cmd (Mac) or Ctrl (Windows) in combination with the keys S, A, or C for, saving, appending, and clearing data respectively. However, this approach is not feasible because these key combinations have predefined functions in most browsers.

To address this, I propose using the same keys but incorporating the Shift key. This would keep the shortcuts intuitive and closely aligned with the standard commands users are familiar with, while avoiding conflicts with browser shortcuts.

Suggested Key Combinations:

This approach provides a consistent, recognizable pattern.

Let me know what you think about this.

atj393 commented 1 month ago

After reviewing the common Chrome shortcuts, here are some suggested changes to avoid conflicts:

Ctrl + Shift + P: Conflicts with the Print dialog in Windows/Linux. Ctrl + Shift + S: Safe, but might overlap with other extensions. Ctrl + Shift + A: Conflicts with searching open tabs in some Chrome versions. Ctrl + Shift + C: Interferes with Copying an HTML element in Developer Tools.

Suggested Alternatives:

Command Palette: Ctrl + Alt + M (instead of Ctrl + Shift + P). Save Data: Ctrl + Alt + S. Append Data: Ctrl + Alt + A. Clear Data: Ctrl + Alt + C.

Using Ctrl + Alt reduces conflicts and maintains consistency. Let me know your thoughts!

ASANIYAN commented 1 month ago

Alright.

I believe using Alt would be much better, as you said. I will work on that.

Thank you.

atj393 commented 1 month ago

@ASANIYAN cool, thanks! Please avoid implementing "Clear Data: Ctrl + Alt + C", it's a bit risky.

ASANIYAN commented 1 month ago

Alright.

What do you think we should use instead?

ASANIYAN commented 1 month ago

Hello @atj393

It seems commands with Cmd + Alt do not work as I encountered an issue while trying to unpack after adding the commands in the manifest.json file.

Can we revisit the commands and maybe include Cmd and Shift along with numeric values

atj393 commented 1 month ago

Alright.

What do you think we should use instead?

We can completely ignore the clear functionality with shortcuts!

atj393 commented 1 month ago

Hello @atj393

It seems commands with Cmd + Alt do not work as I encountered an issue while trying to unpack after adding the commands in the manifest.json file.

Can we revisit the commands and maybe include Cmd and Shift along with numeric values

@ASANIYAN Yes, sounds good! If numeric values will not conflict with any existing shortcuts, please proceed. Thanks!

atj393 commented 1 month ago

@ASANIYAN are you still interested in working on this topic?

ASANIYAN commented 1 month ago

Yes, I am. I am working on it. Kindly give me some more time. Thank you

atj393 commented 1 month ago

@ASANIYAN all good! Just checking. Thanks.

atj393 commented 1 month ago

@ASANIYAN Great Work! Thanks for your contribution.