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

Hotkeys #94

Open
DEEKAYR opened this issue Aug 3, 2021 · 8 comments
Open

Hotkeys #94

DEEKAYR opened this issue Aug 3, 2021 · 8 comments
Labels
feature request New feature or request

Comments

@DEEKAYR
Copy link

DEEKAYR commented Aug 3, 2021

rebindable hotkeys additional to the already existing ones that would work even when the window is not in focus (AKA I am in game) would be nice. E.g. Timer start, timer pause and switching to timer two.

@DEEKAYR DEEKAYR added the feature request New feature or request label Aug 3, 2021
@RVRX
Copy link
Owner

RVRX commented Aug 3, 2021

This sounds like a cool idea. I haven't worked with global hotkeys before so I'll start research on libraries and APIs.

Library/API Options

@RVRX RVRX pinned this issue Aug 3, 2021
@RVRX
Copy link
Owner

RVRX commented Aug 3, 2021

Settled on jkeymaster as global hotkey library.

Feature Layout

  • Add new button to settings page to open a "hotkey manager" window (using a separate window as the settings page is already bulky).
  • Hotkey Manager will have option to enable global shortcuts.
  • Have fields to set shortcuts for:
    • Single shortcut for toggling timer play/pause.
    • Timer switch
    • ...
  • Allow user to input keys, and interpret them into a KeyStroke object
  • Alternatively to the above, have an input box where the user types the keystroke
  • Feature documentation

@RVRX
Copy link
Owner

RVRX commented Aug 4, 2021

Will need to save these as a preference and init them on application startup

RVRX added a commit that referenced this issue Aug 4, 2021
RVRX added a commit that referenced this issue Aug 4, 2021
RVRX added a commit that referenced this issue Aug 4, 2021
RVRX added a commit that referenced this issue Aug 4, 2021
@RVRX
Copy link
Owner

RVRX commented Aug 4, 2021

No point in having a timer switch without a timer restart, and the same follows vice versa. Therefore the two will probably be bundled. One shortcut to switch timer then restart.

@RVRX
Copy link
Owner

RVRX commented Aug 4, 2021

Currently experiencing issues switching hotkeys after init. Might necessitate an application restart after editing hotkeys

RVRX added a commit that referenced this issue Aug 4, 2021
- Requires app restart to apply / update changes.
- change to key mapper stage size
- `Master.java` calls fcn for updating hotkeys
- `GlobalHotKeys.java` has many of the the hotkey fcn in it instead of 'App.java'
@RVRX
Copy link
Owner

RVRX commented Aug 4, 2021

Currently experiencing issues switching hotkeys after init. Might necessitate an application restart after editing hotkeys

Handled in last commit (71635df), user is now prompted to restart:
image

RVRX added a commit that referenced this issue Aug 4, 2021
@RVRX
Copy link
Owner

RVRX commented Aug 5, 2021

In order to handle getting users keystrokes I must:

  1. Unfocus both fields on start
  2. start recording keypresses when a field is focused
  3. add each key to list
  4. stop recording once enter is pressed (remove focus)

RVRX added a commit that referenced this issue Aug 11, 2021
…er keypresses and translate between JavaFX KeyEvents and JDK/(Swing?) KeyEvents
@RVRX
Copy link
Owner

RVRX commented Aug 12, 2021

Beta version of this feature out now for mac, soon for windows.

see: https://github.com/RVRX/GoICasterCompanion/releases/tag/1.2.0-beta0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants