Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Games
trosnoth
Commits
6d66e120682a
Commit
2a971a4f
authored
Feb 01, 2021
by
talljosh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated K_* constant name mapping for Pygame 2
parent
5a5f99dece37
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
6 deletions
+15
-6
requirements
requirements
+1
-1
setup.py
setup.py
+1
-1
trosnoth/gui/keyboard.py
trosnoth/gui/keyboard.py
+13
-4
No files found.
requirements
View file @
6d66e120
pygame
<
2
pygame
>=
2
twisted>=15.0
simplejson
PySide2
...
...
setup.py
View file @
6d66e120
...
...
@@ -40,7 +40,7 @@ if __name__ == '__main__':
long_description
=
'Trosnoth is a fast-paced open source territory control team platform game.'
,
install_requires
=
[
'pygame
<
2'
,
'pygame
>=
2'
,
'twisted>=15.0'
,
'simplejson'
,
'PySide2'
,
...
...
trosnoth/gui/keyboard.py
View file @
6d66e120
...
...
@@ -30,15 +30,18 @@ def shortcutName(key, modifiers=0):
NAMED
=
{
-
1
:
'L.Click'
,
-
2
:
'M.Click'
,
-
3
:
'R.Click'
,
pygame
.
K_AC_BACK
:
'←'
,
pygame
.
K_BACKSPACE
:
'Backspace'
,
pygame
.
K_BREAK
:
'Break'
,
pygame
.
K_CAPSLOCK
:
'Capslock'
,
pygame
.
K_CLEAR
:
'Clear'
,
pygame
.
K_DELETE
:
pygame
.
K_CAPSLOCK
:
'Capslock'
,
pygame
.
K_CLEAR
:
'Clear'
,
pygame
.
K_CURRENCYSUBUNIT
:
'Cents'
,
pygame
.
K_DELETE
:
'Del'
,
pygame
.
K_DOWN
:
'Down'
,
pygame
.
K_END
:
'End'
,
pygame
.
K_ESCAPE
:
'Escape'
,
pygame
.
K_EURO
:
'Euro'
,
pygame
.
K_F1
:
'F1'
,
pygame
.
K_F2
:
'F2'
,
pygame
.
K_F3
:
'F3'
,
pygame
.
K_F4
:
'F4'
,
pygame
.
K_F5
:
'F5'
,
pygame
.
K_F6
:
'F6'
,
pygame
.
K_F7
:
'F7'
,
pygame
.
K_F8
:
'F8'
,
pygame
.
K_F9
:
'F9'
,
pygame
.
K_F10
:
'F10'
,
pygame
.
K_F11
:
'F11'
,
pygame
.
K_F12
:
'F12'
,
pygame
.
K_F13
:
'F13'
,
pygame
.
K_F14
:
'F14'
,
pygame
.
K_F15
:
'F15'
,
pygame
.
K_FIRST
:
'First'
,
pygame
.
K_HELP
:
'Help'
,
pygame
.
K_HOME
:
'Home'
,
pygame
.
K_HELP
:
'Help'
,
pygame
.
K_HOME
:
'Home'
,
pygame
.
K_INSERT
:
'Ins'
,
pygame
.
K_LALT
:
'L.Alt'
,
pygame
.
K_LCTRL
:
'L.Ctrl'
,
pygame
.
K_LEFT
:
'Left'
,
pygame
.
K_LMETA
:
'L.Meta'
,
pygame
.
K_LSHIFT
:
'L.Shift'
,
pygame
.
K_LSUPER
:
'L.Super'
,
pygame
.
K_MENU
:
...
...
@@ -74,8 +77,14 @@ NAMED = {
pygame
.
K_COLON
:
':'
,
pygame
.
K_COMMA
:
','
,
pygame
.
K_DOLLAR
:
'$'
,
pygame
.
K_EQUALS
:
'='
,
pygame
.
K_EXCLAIM
:
'!'
,
pygame
.
K_GREATER
:
'>'
,
pygame
.
K_LESS
:
'<'
,
pygame
.
K_HASH
:
'#'
,
pygame
.
K_LEFTBRACKET
:
'['
,
pygame
.
K_LEFTPAREN
:
'('
,
pygame
.
K_MINUS
:
'-'
,
pygame
.
K_PERIOD
:
'.'
,
pygame
.
K_PLUS
:
'+'
,
pygame
.
K_QUOTE
:
"'"
,
pygame
.
K_RIGHTBRACKET
:
']'
,
pygame
.
K_LEFTPAREN
:
'('
,
pygame
.
K_MINUS
:
'-'
,
pygame
.
K_PERCENT
:
'%'
,
pygame
.
K_PERIOD
:
'.'
,
pygame
.
K_PLUS
:
'+'
,
pygame
.
K_QUOTE
:
"'"
,
pygame
.
K_QUOTEDBL
:
'"'
,
pygame
.
K_QUESTION
:
'?'
,
pygame
.
K_RIGHTBRACKET
:
']'
,
pygame
.
K_RIGHTPAREN
:
')'
,
pygame
.
K_SEMICOLON
:
';'
,
pygame
.
K_SLASH
:
'/'
,
pygame
.
K_UNDERSCORE
:
'_'
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment