Add keyboard shortcuts for the Query Tool. Fixes #2900

This commit is contained in:
Murtuza Zabuawala
2018-02-27 14:32:03 +00:00
committed by Dave Page
parent 055f7abc9e
commit a9de043fef
14 changed files with 1133 additions and 356 deletions

View File

@@ -11,6 +11,7 @@ from collections import defaultdict
from operator import attrgetter
from flask import Blueprint, current_app
from flask_babel import gettext
from .paths import get_storage_directory
from .preferences import Preferences
@@ -280,3 +281,39 @@ def get_complete_file_path(file):
file = fs_short_path(file)
return file if os.path.isfile(file) else None
# Shortcut configuration for Accesskey
ACCESSKEY_FIELDS = [
{
'name': 'key',
'type': 'keyCode',
'label': gettext('Key')
}
]
# Shortcut configuration
SHORTCUT_FIELDS = [
{
'name': 'key',
'type': 'keyCode',
'label': gettext('Key')
},
{
'name': 'shift',
'type': 'checkbox',
'label': gettext('Shift')
},
{
'name': 'control',
'type': 'checkbox',
'label': gettext('Ctrl')
},
{
'name': 'alt',
'type': 'checkbox',
'label': gettext('Alt/Option')
}
]