Proper fix for #2270

Fixes #2270
This commit is contained in:
Kovid Goyal 2020-01-14 18:46:08 +05:30
parent 922d6b3b32
commit 68e00bc8e1
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 5 additions and 0 deletions

View File

@ -16,6 +16,8 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
- Add a :opt:`resize_in_steps` option that can be used to resize the OS window
in steps as large as character cells (:pull:`2131`)
- Fix a segfault when using :opt:`--debug-config` with maps (:iss:`2270`)
0.15.1 [2019-12-21]
--------------------

View File

@ -840,6 +840,9 @@ static PyObject*
glfw_get_key_name(PyObject UNUSED *self, PyObject *args) {
int key, native_key;
if (!PyArg_ParseTuple(args, "ii", &key, &native_key)) return NULL;
if (!glfwGetKeyName) {
return PyUnicode_FromFormat("key: %d native_key: %d", key, native_key);
}
return Py_BuildValue("z", glfwGetKeyName(key, native_key));
}