Output native key names in --debug-config

This commit is contained in:
Kovid Goyal 2018-06-30 18:48:39 +05:30
parent 05227e7dfb
commit c7879d06c9
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -7,9 +7,10 @@ import re
import sys import sys
from collections import deque from collections import deque
from .config import defaults, load_config
from .conf.utils import resolve_config from .conf.utils import resolve_config
from .config import defaults, load_config
from .constants import appname, defconf, is_macos, is_wayland, str_version from .constants import appname, defconf, is_macos, is_wayland, str_version
from .fast_data_types import GLFW_KEY_UNKNOWN, glfw_get_key_name
CONFIG_HELP = '''\ CONFIG_HELP = '''\
Specify a path to the configuration file(s) to use. All configuration files are Specify a path to the configuration file(s) to use. All configuration files are
@ -630,7 +631,7 @@ def print_shortcut(key_sequence, action):
names.append(name) names.append(name)
if key: if key:
if is_native: if is_native:
names.append('<native key 0x{:x}>'.format(key)) names.append(glfw_get_key_name(GLFW_KEY_UNKNOWN, key))
else: else:
names.append(krmap[key]) names.append(krmap[key])
keys.append('+'.join(names)) keys.append('+'.join(names))