Bottles icon indicating copy to clipboard operation
Bottles copied to clipboard

Keyboard Shortcut Improvements

Open cyberphantom52 opened this issue 1 year ago • 6 comments

Description

Aims to add standard keyboard shortcuts to bottles for easier access to certain actions. Also adds a shortcuts window.

Type of change

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [X] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

  • [X] Locally

cyberphantom52 avatar Feb 16 '23 13:02 cyberphantom52

Currently shortcuts are available but we would ideally want them to be context dependent, for example we wouldn't want "New Bottle" shortcut to be available when the user is inside a existing bottle.

cyberphantom52 avatar Feb 16 '23 13:02 cyberphantom52

Pylint result on modfied files:
************* Module bottles.frontend.main
bottles/frontend/main.py:27:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:27:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:28:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:28:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:29:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:29:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:49:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:50:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:52:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:54:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:58:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:63:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:66:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:66:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:85:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:89:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:89:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:89:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:90:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:91:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:91:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:92:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:92:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:93:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:93:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:94:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:94:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:95:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:95:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:96:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:96:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:97:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:97:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:185:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:185:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:185:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:185:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:208:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:208:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:212:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:212:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:213:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:216:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:216:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:216:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:216:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/main.py:33:0: C0413: Import "from gi.repository import Gtk, Gio, Gdk, GLib, GObject, Adw" should be placed at the top of the module (wrong-import-position)
bottles/frontend/main.py:33:0: E0611: No name 'Adw' in module 'gi.repository' (no-name-in-module)
bottles/frontend/main.py:35:0: W0401: Wildcard import bottles.frontend.params (wildcard-import)
bottles/frontend/main.py:35:0: C0413: Import "from bottles.frontend.params import *" should be placed at the top of the module (wrong-import-position)
bottles/frontend/main.py:36:0: C0413: Import "from bottles.backend.logger import Logger" should be placed at the top of the module (wrong-import-position)
bottles/frontend/main.py:37:0: C0413: Import "from bottles.frontend.windows.main_window import MainWindow" should be placed at the top of the module (wrong-import-position)
bottles/frontend/main.py:38:0: C0413: Import "from bottles.frontend.views.preferences import PreferencesWindow" should be placed at the top of the module (wrong-import-position)
bottles/frontend/main.py:39:0: C0413: Import "from bottles.backend.health import HealthChecker" should be placed at the top of the module (wrong-import-position)
bottles/frontend/main.py:50:0: C0103: Constant name "base_dir" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/frontend/main.py:174:12: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/main.py:180:12: W0105: String statement has no effect (pointless-string-statement)
bottles/frontend/main.py:184:16: C0103: Variable name "a" doesn't conform to snake_case naming style (invalid-name)
bottles/frontend/main.py:215:8: W0621: Redefining name 'subprocess' from outer scope (line 24) (redefined-outer-name)
bottles/frontend/main.py:202:12: C0415: Import outside toplevel (bottles.frontend.windows.bottlepicker.BottlePickerDialog) (import-outside-toplevel)
bottles/frontend/main.py:215:8: W0404: Reimport 'subprocess' (imported line 24) (reimported)
bottles/frontend/main.py:215:8: C0415: Import outside toplevel (subprocess) (import-outside-toplevel)
bottles/frontend/main.py:216:8: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
bottles/frontend/main.py:195:4: R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
bottles/frontend/main.py:249:8: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/main.py:243:15: W0613: Unused argument 'action' (unused-argument)
bottles/frontend/main.py:243:28: W0613: Unused argument 'param' (unused-argument)
bottles/frontend/main.py:252:15: W0613: Unused argument 'action' (unused-argument)
bottles/frontend/main.py:252:28: W0613: Unused argument 'param' (unused-argument)
bottles/frontend/main.py:260:24: W0613: Unused argument 'action' (unused-argument)
bottles/frontend/main.py:260:37: W0613: Unused argument 'param' (unused-argument)
bottles/frontend/main.py:268:0: W0613: Unused argument 'args' (unused-argument)
bottles/frontend/main.py:272:0: W0613: Unused argument 'args' (unused-argument)
bottles/frontend/main.py:275:4: W1113: Keyword argument before variable positional arguments list in the definition of __show_importer_view function (keyword-arg-before-vararg)
bottles/frontend/main.py:275:35: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/main.py:275:0: W0613: Unused argument 'args' (unused-argument)
bottles/frontend/main.py:260:4: W0238: Unused private member `Bottles.__refresh(self, action=None, param=None)` (unused-private-member)
bottles/frontend/main.py:239:8: W0201: Attribute 'win' defined outside __init__ (attribute-defined-outside-init)
bottles/frontend/main.py:374:9: W0613: Unused argument 'version' (unused-argument)
bottles/frontend/main.py:20:0: C0411: standard import "import os" should be placed before "import gi" (wrong-import-order)
bottles/frontend/main.py:21:0: C0411: standard import "import gettext" should be placed before "import gi" (wrong-import-order)
bottles/frontend/main.py:22:0: C0411: standard import "import locale" should be placed before "import gi" (wrong-import-order)
bottles/frontend/main.py:23:0: C0411: standard import "import webbrowser" should be placed before "import gi" (wrong-import-order)
bottles/frontend/main.py:24:0: C0411: standard import "import subprocess" should be placed before "import gi" (wrong-import-order)
bottles/frontend/main.py:25:0: C0411: standard import "from os import path" should be placed before "import gi" (wrong-import-order)
bottles/frontend/main.py:24:0: W0611: Unused import subprocess (unused-import)
bottles/frontend/main.py:33:0: W0611: Unused Gdk imported from gi.repository (unused-import)
bottles/frontend/main.py:35:0: W0614: Unused import(s) APP_NAME_LOWER, APP_ID, BUILD_TYPE, ANIM_DURATION, EXECUTABLE_EXTS and DOC_URL from wildcard import of bottles.frontend.params (unused-wildcard-import)
************* Module bottles.frontend.views.new
bottles/frontend/views/new.py:174:0: C0303: Trailing whitespace (trailing-whitespace)
bottles/frontend/views/new.py:263:9: W0511: TODO: Remove this ugly zig zag and find a better way to set the environment (fixme)
bottles/frontend/views/new.py:284:13: W0511: TODO: Implement AdwMessageDialog to prompt the user if they are (fixme)
bottles/frontend/views/new.py:20:0: E0611: No name 'Adw' in module 'gi.repository' (no-name-in-module)
bottles/frontend/views/new.py:121:8: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
bottles/frontend/views/new.py:175:8: W0105: String statement has no effect (pointless-string-statement)

github-actions[bot] avatar Feb 16 '23 13:02 github-actions[bot]

Can you rename kb-shortcuts.blp to help-overlay.blp? It's the default file name in GNOME Builder.

TheEvilSkeleton avatar Feb 23 '23 22:02 TheEvilSkeleton

Can you rename kb-shortcuts.blp to help-overlay.blp? It's the default file name in GNOME Builder.

Yes i'll update that

cyberphantom52 avatar Feb 25 '23 21:02 cyberphantom52

Is this still a draft?

mirkobrombin avatar Mar 25 '24 20:03 mirkobrombin

Is this still a draft?

Last i remember, there was this issue https://github.com/bottlesdevs/Bottles/pull/2683#issuecomment-1433099891

Apart from that i think this just needs a rebase.

cyberphantom52 avatar Mar 26 '24 00:03 cyberphantom52