Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libSDL
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
libSDL
Commits
9f37dd98
Commit
9f37dd98
authored
Jul 18, 2010
by
Sam Lantinga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added back in a little more debugging for the X11 keyboard code
parent
fb034577
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
SDL_x11events.c
src/video/x11/SDL_x11events.c
+2
-2
SDL_x11keyboard.c
src/video/x11/SDL_x11keyboard.c
+3
-1
No files found.
src/video/x11/SDL_x11events.c
View file @
9f37dd98
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
#include "SDL_timer.h"
#include "SDL_timer.h"
#include "SDL_syswm.h"
#include "SDL_syswm.h"
/*#define DEBUG_XEVENTS*/
#define DEBUG_XEVENTS
static
void
static
void
X11_DispatchEvent
(
_THIS
)
X11_DispatchEvent
(
_THIS
)
...
@@ -181,7 +181,7 @@ X11_DispatchEvent(_THIS)
...
@@ -181,7 +181,7 @@ X11_DispatchEvent(_THIS)
printf
(
"KeyPress (X11 keycode = 0x%X)
\n
"
,
xevent
.
xkey
.
keycode
);
printf
(
"KeyPress (X11 keycode = 0x%X)
\n
"
,
xevent
.
xkey
.
keycode
);
#endif
#endif
SDL_SendKeyboardKey
(
SDL_PRESSED
,
videodata
->
key_layout
[
keycode
]);
SDL_SendKeyboardKey
(
SDL_PRESSED
,
videodata
->
key_layout
[
keycode
]);
#if
0
#if
1
if
(
videodata
->
key_layout
[
keycode
]
==
SDLK_UNKNOWN
)
{
if
(
videodata
->
key_layout
[
keycode
]
==
SDLK_UNKNOWN
)
{
int
min_keycode
,
max_keycode
;
int
min_keycode
,
max_keycode
;
XDisplayKeycodes
(
display
,
&
min_keycode
,
&
max_keycode
);
XDisplayKeycodes
(
display
,
&
min_keycode
,
&
max_keycode
);
...
...
src/video/x11/SDL_x11keyboard.c
View file @
9f37dd98
...
@@ -211,7 +211,9 @@ X11_InitKeyboard(_THIS)
...
@@ -211,7 +211,9 @@ X11_InitKeyboard(_THIS)
}
}
}
}
if
(
j
==
SDL_arraysize
(
fingerprint
))
{
if
(
j
==
SDL_arraysize
(
fingerprint
))
{
/* printf("Using scancode set %d\n", i); */
#ifdef DEBUG_KEYBOARD
printf
(
"Using scancode set %d, min_keycode = %d, max_keycode = %d, table_size = %d
\n
"
,
i
,
min_keycode
,
max_keycode
,
scancode_set
[
i
].
table_size
);
#endif
SDL_memcpy
(
&
data
->
key_layout
[
min_keycode
],
scancode_set
[
i
].
table
,
SDL_memcpy
(
&
data
->
key_layout
[
min_keycode
],
scancode_set
[
i
].
table
,
sizeof
(
SDL_scancode
)
*
scancode_set
[
i
].
table_size
);
sizeof
(
SDL_scancode
)
*
scancode_set
[
i
].
table_size
);
fingerprint_detected
=
SDL_TRUE
;
fingerprint_detected
=
SDL_TRUE
;
...
...
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