fix crash for mute key
This commit is contained in:
parent
8614e19b25
commit
427f63d0d5
@ -237,7 +237,14 @@ class driver(inputDriver):
|
||||
return None
|
||||
mEvent = inputData.inputEvent
|
||||
try:
|
||||
# mute is a list = ['KEY_MIN_INTERESTING', 'KEY_MUTE']
|
||||
mEvent['EventName'] = evdev.ecodes.keys[event.code]
|
||||
if isinstance(mEvent['EventName'], list):
|
||||
if len(mEvent['EventName']) > 0:
|
||||
mEvent['EventName'] = mEvent['EventName'][0]
|
||||
if isinstance(mEvent['EventName'], list):
|
||||
if len(mEvent['EventName']) > 0:
|
||||
mEvent['EventName'] = mEvent['EventName'][0]
|
||||
mEvent['EventValue'] = event.code
|
||||
mEvent['EventSec'] = event.sec
|
||||
mEvent['EventUsec'] = event.usec
|
||||
|
Loading…
Reference in New Issue
Block a user