mirror of https://github.com/kivy/kivy.git
- updated check for unicode key in kwargs; semantically makes more sense though
end result is the same as before; such a simple change makes it easier to read
This commit is contained in:
parent
d3018f304c
commit
3a3abaa8aa
|
@ -760,7 +760,7 @@ class WindowBase(EventDispatcher):
|
|||
.. warning::
|
||||
Some providers may omit `scancode`, `codepoint` and/or `modifier`!
|
||||
'''
|
||||
if kwargs.get('unicode'):
|
||||
if 'unicode' in kwargs:
|
||||
warn("The use of the unicode parameter is deprecated, and will be "
|
||||
"removed in future versions. Use codepoint instead, which "
|
||||
"has identical semantics.")
|
||||
|
@ -769,7 +769,7 @@ class WindowBase(EventDispatcher):
|
|||
def on_key_down(self, key,
|
||||
scancode=None, codepoint=None, modifier=None, **kwargs):
|
||||
'''Event called when a key is down (same arguments as on_keyboard)'''
|
||||
if kwargs.get('unicode'):
|
||||
if 'unicode' in kwargs:
|
||||
warn("The use of the unicode parameter is deprecated, and will be "
|
||||
"removed in future versions. Use codepoint instead, which "
|
||||
"has identical semantics.")
|
||||
|
@ -777,7 +777,7 @@ class WindowBase(EventDispatcher):
|
|||
def on_key_up(self, key,
|
||||
scancode=None, codepoint=None, modifier=None, **kwargs):
|
||||
'''Event called when a key is up (same arguments as on_keyboard)'''
|
||||
if kwargs.get('unicode'):
|
||||
if 'unicode' in kwargs:
|
||||
warn("The use of the unicode parameter is deprecated, and will be "
|
||||
"removed in future versions. Use codepoint instead, which "
|
||||
"has identical semantics.")
|
||||
|
|
Loading…
Reference in New Issue