[CB] hotkeys with "/" and "\" dont work after hotkeys library version upgrade #5781 (#3478)

* dbeaver/pro#5781 fixes shortcuts with slashes symbols + correctly translates it in the shortcut tips section

* moves display logic in SHORCUTS_DATA helpers

* adds replace all for shorcuts to consider sequential shorcuts cases

* adds formatShortcutKeys helper

* removes useless code

* adds alt -> option conversion

* refactors formatKey logic to switch

* cleanup

* cleanup

* cleanup

* switch with lowerCaseCode

* moves shortcut helpers to core-utils + uses it everywhere

* Revert "moves shortcut helpers to core-utils + uses it everywhere"

This reverts commit b4eeda5adf.
This commit is contained in:
sergeyteleshev
2025-05-27 17:50:17 +02:00
committed by GitHub
parent c4886127a6
commit a098db62c3
4 changed files with 51 additions and 16 deletions
@@ -1,6 +1,6 @@
/*
* CloudBeaver - Cloud Database Manager
* Copyright (C) 2020-2024 DBeaver Corp and others
* Copyright (C) 2020-2025 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0.
* you may not use this file except in compliance with the License.
@@ -9,6 +9,6 @@ import { createKeyBinding } from '@cloudbeaver/core-view';
export const KEY_BINDING_SQL_EDITOR_EXECUTE_NEW = createKeyBinding({
id: 'sql-editor-execute-new',
keys: ['mod+\\', 'shift+mod+enter'],
keys: ['mod+backslash', 'shift+mod+enter'],
preventDefault: true,
});