SDL 1.2 Mac shortcut key passthrough

Hi,

I’ve been looking for a way to make the Mac OS X shortcuts work
seamlessly with SDL 1.2 and I found this:

http://www.idevgames.com/forums/thread-263-post-74168.html#pid74168

I made a patch out of it - see attached. I do not take any credit for
it - Scorche on the idevgames came up with it.

Would this be OK to be included in SDL?

Thanks!
D
-------------- next part --------------
A non-text attachment was scrubbed…
Name: sdl_shortcut_key_passthrough.diff
Type: text/x-patch
Size: 498 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20120207/bf5c941e/attachment.bin

I think would be good to have the default system shortcuts working on any system, with an opt-out to disable.
What you think?

D B wrote:> Hi,

I’ve been looking for a way to make the Mac OS X shortcuts work
seamlessly with SDL 1.2 and I found this:

http://www.idevgames.com/forums/thread-263-post-74168.html#pid74168

I made a patch out of it - see attached. I do not take any credit for
it - Scorche on the idevgames came up with it.

Would this be OK to be included in SDL?

Thanks!
D


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

That sounds good - but honestly, I don’t know if any other than Mac users
have such a unified experience with the shortcuts to actually use them…On Tue, Feb 7, 2012 at 5:41 PM, RodrigoCard wrote:

**
I think would be good to have the default system shortcuts working on any
system, with an opt-out to disable.
What you think?

D B wrote:

Hi,

I’ve been looking for a way to make the Mac OS X shortcuts work
seamlessly with SDL 1.2 and I found this:

http://www.idevgames.com/forums/thread-263-post-74168.html#pid74168

I made a patch out of it - see attached. I do not take any credit for
it - Scorche on the idevgames came up with it.

Would this be OK to be included in SDL?

Thanks!
D


SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Alt+F4 and Alt+Tab use is pretty common in other OSes and is not managed by default.
And Alt+tab dont work on fullscreen in X11, afaik.

D B wrote:> That sounds good - but honestly, I don’t know if any other than Mac users have such a unified experience with the shortcuts to actually use them…

On Tue, Feb 7, 2012 at 5:41 PM, RodrigoCard <@Rodrigo_C_Rocha (@Rodrigo_C_Rocha)> wrote:

  I think would be good to have the default system shortcuts working on any system, with an opt-out to disable.

What you think?

D B wrote:

Hi,

I’ve been looking for a way to make the Mac OS X shortcuts work
seamlessly with SDL 1.2 and I found this:

http://www.idevgames.com/forums/thread-263-post-74168.html#pid74168 (http://www.idevgames.com/forums/thread-263-post-74168.html#pid74168)

I made a patch out of it - see attached. I do not take any credit for
it - Scorche on the idevgames came up with it.

Would this be OK to be included in SDL?

Thanks!
D


SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org (http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)


SDL mailing list
SDL at lists.libsdl.org (SDL at lists.libsdl.org)
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org (http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)

Hello !

Alt+F4 and Alt+Tab use is pretty common in other OSes and is not managed by default.
And Alt+tab dont work on fullscreen in X11, afaik.

Does KDE not handle ALT+F4 and send a QUIT event to the app ?
But you are right Alt+Tab does not work in fullscreen in X11, which is …

But shortcuts is a good question, this would be definitely something for an external
library, that keeps a database for the major systems and generate special
events when for example Ctrl + C or Ctrl + V are pressed.

CU

I’ve been looking for a way to make the Mac OS X shortcuts work
seamlessly with SDL 1.2 and I found this:

I’d like to see this part of SDL 1.2 too, perhaps optionally enabled using
an environment variable.

I’m still using a combination of SDL_ENABLEAPPEVENTS and a sendEvent
override to get the standard OS X key shortcuts to work in my existing SDL
1.2 app. Though sendEvent relies on the deprecated poseAsClass, which I
believe is missing for x86_64 builds.

Things look slightly more promising for SDL2, but I’ve still yet to get it
working without changes to the SDL source. The keyboard shortcuts
in SDL_cocoaevents.m are commented out, but they do work if I restore
them. It also looks like you can set up your own menu before SDL_Init is
called, and SDL won’t replace it with its default. Though my attempts to
use a custom nib haven’t worked so far ? has anyone managed it?On Tue, Feb 7, 2012 at 7:28 PM, D B wrote: