Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix QKeySequence crash
  • Loading branch information
alexhenrie committed Oct 23, 2015
1 parent 56be5ba commit 6179216
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/m64py/frontend/input.py
Expand Up @@ -17,6 +17,7 @@
import re

from PyQt5.QtWidgets import QDialog
from PyQt5.QtGui import QKeySequence

from m64py.opts import SDL2
from m64py.core.defs import *
Expand Down Expand Up @@ -417,7 +418,7 @@ def get_sdl_key(self, text):
return SCANCODE2KEYCODE[SDL_GetScancodeFromName(text)]
else:
try:
key = QKeySequence(text).__int__()
key = QKeySequence(text)[0]
return QT2SDL[key]
except KeyError:
return None
Expand Down

0 comments on commit 6179216

Please sign in to comment.