Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Change session tab shortcuts to fix AltGr problem #13015

Closed
wants to merge 5 commits into from
Closed

Change session tab shortcuts to fix AltGr problem #13015

wants to merge 5 commits into from

Conversation

vinicentus
Copy link

@vinicentus vinicentus commented Feb 5, 2018

Update so that the shortcut doesn't interfere with AltGr shortcuts as seen here: #12956. This would also change the shortcuts to Cmd + Alt + partitionNumber for MacOS and Ctrl + Shift + partitionNumber for Windows and Linux.

I personally think this is a better shortcut since it's easier to do with only one hand (at least on Windows and Linux).

The original problem comes from here #6915

NOTE: The shortcuts also need to be changed like seen here #13000, but I couldn't find it in the code.
Fixes #13000

Fixes #12956

Submitter Checklist:

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).
  • Tagged reviewers and labelled the pull request as needed.
  • Request a security/privacy review as needed. (Ask a Brave employee to help if you cannot access this document.)

Test Plan:

Reviewer Checklist:

  • Request a security/privacy review as needed if one was not already requested.

Tests

  • Adequate test coverage exists to prevent regressions
  • Tests should be independent and work correctly when run individually or as a suite ref
  • New files have MPL2 license header

Update so that the shortcut doesn't interfere with AltGr shortcuts. The new shortcut is Control + Shift + [session number] for Windows and Command + Option + [session number] on Mac OS.
@NejcZdovc NejcZdovc added this to the 0.20.x Hotfix 2 (Referral Promotion) milestone Feb 5, 2018
@vinicentus vinicentus changed the title Changed session tab shortcuts to fix the problem Change session tab shortcuts to fix AltGr problem Feb 5, 2018
Update so that the shortcut doesn't interfere with AltGr shortcuts. The new shortcut is Control + Shift + [session number] for Windows and Command + Shift + [session number] on Mac OS.
@vinicentus
Copy link
Author

vinicentus commented Feb 5, 2018

Compiled it myself and tested it out. Seems to be working as it should. tested on windows only.

SUGGESTION: Make Windows use Control + Shift and MacOS use Command + Opition, what do you think?

@luixxiul
Copy link
Contributor

luixxiul commented Feb 5, 2018

Just curious, is the proposed change following de facto standard?

@luixxiul luixxiul added the needs-info Another team member needs information from the PR/issue opener. label Feb 5, 2018
@vinicentus
Copy link
Author

vinicentus commented Feb 5, 2018

Just curious, is the proposed change following de facto standard?

If you are talking about shortcut standard I'd say it does, at least on Windows and Linux, somebody please help me out with MacOS ;-) My reasoning for this is that Ctrl + something and Ctrl + Shift + something is often used for tabs.

@vinicentus
Copy link
Author

screenshot 17
screenshot 18
screenshot 19
It would then look like this

@petemill
Copy link
Member

petemill commented Feb 6, 2018

Thanks for your pull request @vinicentus! Unfortunately we cannot accept it at this time since cmd-shift-[number] will interfere with macOS global shortcuts for screenshots. Until we find something suitable, I'm going to revert #10364 and remove the new shortcut entirely in order to fix user's input issues as soon as possible.

@petemill petemill removed this from the 0.20.x Hotfix 2 (Referral Promotion) milestone Feb 6, 2018
@vinicentus
Copy link
Author

vinicentus commented Feb 6, 2018

How about this:
accelerator: isDarwin ? 'CmdOrCtrl+Alt+' + partitionNumber : 'Ctrl+Shift+' + partitionNumber,

Then it would be Cmd + Alt + partitionNumber for MacOS and Ctrl + Shift + partitionNumber for Windows and Linux.

EDIT: Nevermind, the problem persists on MacOS... What could be a better shortcut? Should I open a new issue?
EDIT 2: Shouldn't this work though? Correct me if I'm wrong

Change the shortcuts to something else as not to interfere with symbols like @. Not yet complete!
not really a typ but cleaned up the code
@codecov-io
Copy link

codecov-io commented Feb 6, 2018

Codecov Report

Merging #13015 into master will increase coverage by 0.02%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master   #13015      +/-   ##
==========================================
+ Coverage   56.13%   56.16%   +0.02%     
==========================================
  Files         279      279              
  Lines       27332    27352      +20     
  Branches     4446     4452       +6     
==========================================
+ Hits        15343    15362      +19     
- Misses      11989    11990       +1
Flag Coverage Δ
#unittest 56.16% <100%> (+0.02%) ⬆️
Impacted Files Coverage Δ
app/common/commonMenu.js 52.5% <100%> (+0.29%) ⬆️
app/cmdLine.js 39.8% <0%> (+12.42%) ⬆️

@vinicentus
Copy link
Author

Opening a new issue for this...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature/keyboard-shortcuts needs-info Another team member needs information from the PR/issue opener.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants