Hi - I’m currently porting some OS X stuff to Win32 - working fine so far,
but while Mac OS X reacts on shift or ctrl modifiers, Win32 does not.
Am I missing something here?
if (SDL_PollEvent(&m_Event)) {
switch (m_Event.type) {
case SDL_KEYDOWN:
[...]
// Function call -> SDL_keysym *_key (from m_Event.key.keysym)
[...]
switch (_key->sym) {
case SDLK_UP:
if (_key->mod==KMOD_LSHIFT) {
// --- never gets here
Thx
Arne
(sorry for the little image down here - my mail program does this)
Hi,
you need to use the bitwise operator:
switch (_key->sym) {
case SDLK_UP:
if (_key->mod & KMOD_LSHIFT) {
// --- never gets here, should do now :-)
as e.g. KMOD_NUM and KMOD_CAPS can also be set,
this bit me a while back …
cheers,
John.> ----- Original Message -----
From: priest@seraphim.info (Arne Claus)
To:
Sent: Friday, April 25, 2003 11:20 PM
Subject: [SDL] no KMOD_* @ win32 ?
Hi - I’m currently porting some OS X stuff to Win32 - working fine so far,
but while Mac OS X reacts on shift or ctrl modifiers, Win32 does not.
Am I missing something here?
if (SDL_PollEvent(&m_Event)) {
switch (m_Event.type) {
case SDL_KEYDOWN:
[...]
// Function call -> SDL_keysym *_key (from m_Event.key.keysym)
[...]
switch (_key->sym) {
case SDLK_UP:
if (_key->mod==KMOD_LSHIFT) {
// --- never gets here
Thx
Arne
(sorry for the little image down here - my mail program does this)
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl