Skip to content

Commit

Permalink
fix(suite): Update shortcuts in view only (#13081)
Browse files Browse the repository at this point in the history
  • Loading branch information
jvaclavik authored Jul 2, 2024
1 parent 5c77ed4 commit 6d9b57f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ export const useAppShortcuts = () => {
const dispatch = useDispatch();

useEvent('keydown', e => {
const modKey = e.metaKey; // CMD or Ctrl key
const { altKey } = e;

// press CMD + P to show PassphraseModal
if (device?.connected && modKey && e.key === 'p' && device) {
// press ALT + P to show PassphraseModal
if (device?.connected && altKey && e.code === 'KeyP' && device) {
dispatch(addWalletThunk({ walletType: 'passphrase' }));
dispatch(closeModalApp());
e.preventDefault();
}

// press CMD + D to show SwitchDevice
if (modKey && e.key === 'd' && device) {
// press ALT + D to show SwitchDevice
if (altKey && e.code === 'KeyD' && device) {
dispatch(
goto('suite-switch-device', {
params: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const AddWalletButton = ({ device, instances, onCancel }: AddWalletButton
>
<Row gap={spacings.xs}>
<Translation id="TR_ADD_HIDDEN_WALLET" />{' '}
<HotkeyBadge hotkey={['CTRL', 'KEY_P']} />
<HotkeyBadge hotkey={['ALT', 'KEY_P']} />
</Row>
</Button>
)}
Expand Down

0 comments on commit 6d9b57f

Please sign in to comment.