mirror of
https://github.com/apache/superset.git
synced 2026-04-26 19:44:58 +00:00
refactor: change Windows new tab shortcut to ctrl + q (#12772)
This commit is contained in:
committed by
GitHub
parent
c6093a7469
commit
8bc5c40eab
@@ -43,6 +43,7 @@ import {
|
||||
Input,
|
||||
} from 'src/common/components';
|
||||
import Icon from 'src/components/Icon';
|
||||
import { detectOS } from 'src/utils/common';
|
||||
import {
|
||||
addQueryEditor,
|
||||
CtasEnum,
|
||||
@@ -278,6 +279,8 @@ class SqlEditor extends React.PureComponent {
|
||||
}
|
||||
|
||||
getHotkeyConfig() {
|
||||
// Get the user's OS
|
||||
const userOS = detectOS();
|
||||
return [
|
||||
{
|
||||
name: 'runQuery1',
|
||||
@@ -301,7 +304,7 @@ class SqlEditor extends React.PureComponent {
|
||||
},
|
||||
{
|
||||
name: 'newTab',
|
||||
key: 'ctrl+t',
|
||||
key: userOS === 'Windows' ? 'ctrl+q' : 'ctrl+t',
|
||||
descr: t('New tab'),
|
||||
func: () => {
|
||||
this.props.addQueryEditor({
|
||||
|
||||
Reference in New Issue
Block a user