File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed
Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -13,3 +13,4 @@ Greg Farrell <gregfarrell.org@@gmail.com>
1313Finn Hughes <finn.hughes1@@gmail.com>
1414Marcelo Fernandez <fernandezm@@gmail.com>
1515Simon Hatt <9hatt2@@gmail.com>
16+ Neil Munday <www.mundayweb.com>
Original file line number Diff line number Diff line change 44 Only handles mouse events but could be extended to handle others.
55
66 Requires pysdl2 (and SDL2 library).
7+
8+ Tested configurations:
9+ - SDL2 2.0.5 with PySDL2 0.9.3 on Fedora 25 (x86_64)
10+ - SDL2 with PySDL2 0.9.5 on Ubuntu 14.04
711
812 Install instructions.
913
2024 2. Install PySDL via PIP:
2125
2226 sudo pip2 install PySDL2
23-
24- Tested configurations:
25- - SDL2 2.0.5 with PySDL2 0.9.3 on Fedora 25 (x86_64)
26- - SDL2 with PySDL2 0.9.5 on Ubuntu 14.04
2727
2828 Event handling:
2929
3030 Where possible SDL2 events are mapped to CEF ones. Not all keyboard
3131 modifiers are handled in this example but these could be
32- add by the reader (if desired).
32+ added by the reader (if desired). Modifiers that do not work
33+ for example:
34+
35+ - Ctrl
36+ - Mouse dragging
37+ - Marking text inputs with the shift key
3338
3439 Due to SDL2's lack of GUI widgets there are no GUI controls
3540 for the user. However, as an exercise this example could
@@ -265,7 +270,10 @@ def getKeyCode(key):
265270 if key in keyMap :
266271 return keyMap [key ]
267272 # Key not mapped, raise exception
268- print ("Keyboard mapping incomplete: unsupported SDL key %d. See https://wiki.libsdl.org/SDLKeycodeLookup for mapping." % key )
273+ print ("Keyboard mapping incomplete: \
274+ unsupported SDL key %d. \
275+ See https://wiki.libsdl.org/SDLKeycodeLookup for mapping."
276+ % key )
269277 return None
270278
271279class LoadHandler (object ):
You can’t perform that action at this time.
0 commit comments