Allow non-ASCII chars in keychains. Fixes #303.
This commit is contained in:
parent
06ec1a3885
commit
b7dc2e1bc6
@ -20,8 +20,8 @@
|
||||
"""Base class for vim-like keysequence parser."""
|
||||
|
||||
import re
|
||||
import string
|
||||
import functools
|
||||
import unicodedata
|
||||
|
||||
from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt, QObject
|
||||
|
||||
@ -164,8 +164,7 @@ class BaseKeyParser(QObject):
|
||||
self._keystring = ''
|
||||
return
|
||||
|
||||
if (not txt) or txt not in (string.ascii_letters + string.digits +
|
||||
string.punctuation):
|
||||
if (not txt) or unicodedata.category(txt) == 'Cc': # control chars
|
||||
self._debug_log("Ignoring, no text char")
|
||||
return False
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user