Apple/Command button

Hi!

I have a hopefully easy question.
I wonder if there is a simple way to implement for example Command-Q
(quit) and Command-H (hide) in a SDL application on OS X.

I haven’t found any information about how to do this.

Thanks for your help
// Alexander Bussman

Ditto!

-bill!On Tue, Oct 12, 2004 at 10:13:30PM +0200, Alexander Bussman wrote:

I wonder if there is a simple way to implement for example Command-Q
(quit) and Command-H (hide) in a SDL application on OS X.

You could try making a program that shows you the keypress events to see
which codes correspond to which key and key combinations…

But then I may be wrong, even if that’s the 1st thing I’d try :slight_smile: because
I don’t have a Mac (even if I want one badly since I was 14 :expressionless: )

Bill Kendrick wrote:>On Tue, Oct 12, 2004 at 10:13:30PM +0200, Alexander Bussman wrote:

I wonder if there is a simple way to implement for example Command-Q
(quit) and Command-H (hide) in a SDL application on OS X.

Ditto!

-bill!


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

From pygame:

cmd-q : key 113 (or a unicode of u’q’) with a modifier of 1024
cmd-h : key 104 (or a unicode of u’h’) with a modifier of 1024On Oct 12, 2004, at 6:11 PM, Uplink wrote:

You could try making a program that shows you the keypress events to
see which codes correspond to which key and key combinations…

But then I may be wrong, even if that’s the 1st thing I’d try :slight_smile:
because I don’t have a Mac (even if I want one badly since I was 14 :expressionless:
)

Bill Kendrick wrote:

On Tue, Oct 12, 2004 at 10:13:30PM +0200, Alexander Bussman wrote:

I wonder if there is a simple way to implement for example Command-Q
(quit) and Command-H (hide) in a SDL application on OS X.

Ditto!

-bill!


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Cool. I don’t have SDL libs in front of me (kinda busy at work).
Has anyone know what SDL modifier maps to ‘1024’?
(Obviously, ‘q’ and ‘h’ just map to their ASCII ones, at least here…)

Thx!

-bill!On Tue, Oct 12, 2004 at 06:38:16PM -0400, Bob Ippolito wrote:

From pygame:

cmd-q : key 113 (or a unicode of u’q’) with a modifier of 1024
cmd-h : key 104 (or a unicode of u’h’) with a modifier of 1024

Quoth Bill Kendrick , on 2004-10-12 16:20:56 -0700:

Cool. I don’t have SDL libs in front of me (kinda busy at work).
Has anyone know what SDL modifier maps to ‘1024’?

Seems to be left meta, according to /usr/include/SDL/SDL_keysym.h on
my system:

KMOD_LMETA = 0x0400

—> Drake Wilson
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20041012/46f42cdd/attachment.pgp

Thanks Bob!

I got my SDL application to know when the key combination was pressed
now.
It was the modifier I didn’t know about :slight_smile:

// Alexander BussmanOn 2004-10-13, at 00.38, Bob Ippolito wrote:

From pygame:

cmd-q : key 113 (or a unicode of u’q’) with a modifier of 1024
cmd-h : key 104 (or a unicode of u’h’) with a modifier of 1024

On Oct 12, 2004, at 6:11 PM, Uplink wrote:

You could try making a program that shows you the keypress events to
see which codes correspond to which key and key combinations…

But then I may be wrong, even if that’s the 1st thing I’d try :slight_smile:
because I don’t have a Mac (even if I want one badly since I was 14
:expressionless: )

Bill Kendrick wrote:

On Tue, Oct 12, 2004 at 10:13:30PM +0200, Alexander Bussman wrote:

I wonder if there is a simple way to implement for example
Command-Q (quit) and Command-H (hide) in a SDL application on OS X.

Ditto!

-bill!


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Didn’t this work in previous versions Mac OS X? Didn’t they do some
kind of update that broke these features in the nib files accompanying
SDL for Mac OS X?

Maybe I’m remembering wrongOn Oct 12, 2004, at 11:25 PM, Drake Wilson wrote:

Quoth Bill Kendrick , on 2004-10-12 16:20:56 -0700:

Cool. I don’t have SDL libs in front of me (kinda busy at work).
Has anyone know what SDL modifier maps to ‘1024’?

Seems to be left meta, according to /usr/include/SDL/SDL_keysym.h on
my system:

KMOD_LMETA = 0x0400

—> Drake Wilson


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Quoth Bill Kendrick , on 2004-10-12 16:20:56 -0700:

Cool. I don’t have SDL libs in front of me (kinda busy at work).
Has anyone know what SDL modifier maps to ‘1024’?

Seems to be left meta, according to /usr/include/SDL/SDL_keysym.h on
my system:

KMOD_LMETA = 0x0400

Didn’t this work in previous versions Mac OS X? Didn’t they do some
kind of update that broke these features in the nib files accompanying
SDL for Mac OS X?

Maybe I’m remembering wrong

An update should NEVER break a nib-based application that uses only
public API. Perhaps the nib-less SDLmain.m broke, but it uses
undocumented behavior to create the menus and such. In either case,
this is completely unrelated to the topic at hand.

-bobOn Oct 13, 2004, at 2:33 PM, Donny Viszneki wrote:

On Oct 12, 2004, at 11:25 PM, Drake Wilson wrote:

I have been working on another approach to this
problem. My approach is for programs made using
Project Builder/XCode.

I add code to the SDLMain.m file of the project.

To get Cocoa to hear keystrokes (such as Cmd-Q, Cmd H
and the like), I add the statement
setenv (“SDL_ENABLEAPPEVENTS”, “1”, 1);
to the applicationDidFinishLoading: method in the
class SDLMain.

Next, I make sure Cocoa ignores keystrokes that do not
involve the command key, as Cocoa won’t be able to
handle those; it’ll “beep” at you. If your users don’t
mind a "beep"ing computer while they play games, well,
you don’t need to do this next step! :stuck_out_tongue:

In the implementation of SDLApplication, I add the
following method, which overrides the sendEvent:
method in NSApplication:

  • (void)sendEvent:(NSEvent *)anEvent {
    if( NSKeyDown == [anEvent type] || NSKeyUp ==
    [anEvent type] ) {
    if( [anEvent modifierFlags] & NSCommandKeyMask )
    [super sendEvent: anEvent];
    } else
    [super sendEvent: anEvent];
    }

This seems to work, but I have only tried it in one
application.

Thanks to the creators of the SDL Custom Cocoa
Application template. I would have never thought of
setting SDL_ENABLEAPPEVENTS without it.

John Tanner

— Alexander Bussman wrote:> Hi!

I have a hopefully easy question.
I wonder if there is a simple way to implement for
example Command-Q
(quit) and Command-H (hide) in a SDL application on
OS X.

I haven’t found any information about how to do
this.

Thanks for your help
// Alexander Bussman


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

I tried this approach now but it seams like it’s not working.
Cmd-Q and Cmd-H doesn’t work.
Maybe I misunderstood you, but this is going to make Cmd-Q and Cmd-H to
work without any calls from my event loop?

// Alexander BussmanOn 2004-10-14, at 19.33, John Tanner wrote:

I have been working on another approach to this
problem. My approach is for programs made using
Project Builder/XCode.

I add code to the SDLMain.m file of the project.

To get Cocoa to hear keystrokes (such as Cmd-Q, Cmd H
and the like), I add the statement
setenv (“SDL_ENABLEAPPEVENTS”, “1”, 1);
to the applicationDidFinishLoading: method in the
class SDLMain.

Next, I make sure Cocoa ignores keystrokes that do not
involve the command key, as Cocoa won’t be able to
handle those; it’ll “beep” at you. If your users don’t
mind a "beep"ing computer while they play games, well,
you don’t need to do this next step! :stuck_out_tongue:

In the implementation of SDLApplication, I add the
following method, which overrides the sendEvent:
method in NSApplication:

  • (void)sendEvent:(NSEvent *)anEvent {
    if( NSKeyDown == [anEvent type] || NSKeyUp ==
    [anEvent type] ) {
    if( [anEvent modifierFlags] & NSCommandKeyMask )
    [super sendEvent: anEvent];
    } else
    [super sendEvent: anEvent];
    }

This seems to work, but I have only tried it in one
application.

Thanks to the creators of the SDL Custom Cocoa
Application template. I would have never thought of
setting SDL_ENABLEAPPEVENTS without it.

John Tanner

— Alexander Bussman <@Alexander_Bussman> wrote:

Hi!

I have a hopefully easy question.
I wonder if there is a simple way to implement for
example Command-Q
(quit) and Command-H (hide) in a SDL application on
OS X.

I haven’t found any information about how to do
this.

Thanks for your help
// Alexander Bussman


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Are you using a .nib file?
I just tried my approach without a .nib file, and only
thing I could get the computer to recognize is Cmd-M
for minimize. You see, the .nib-file less program
didn’t even have menu options for Quit and Hide!

You should be able to make your program’s window
minimize by pressing Cmd-M and make the computer
"beep" by pressing Cmd-anything else. If so, try
converting your project to a nib-based one. Later
today, I’ll reconstruct how I did that, if you need
help.

John Tanner

— Alexander Bussman wrote:> I tried this approach now but it seams like it’s not

working.
Cmd-Q and Cmd-H doesn’t work.
Maybe I misunderstood you, but this is going to make
Cmd-Q and Cmd-H to
work without any calls from my event loop?

// Alexander Bussman

On 2004-10-14, at 19.33, John Tanner wrote:

I have been working on another approach to this
problem. My approach is for programs made using
Project Builder/XCode.

I add code to the SDLMain.m file of the project.

To get Cocoa to hear keystrokes (such as Cmd-Q,
Cmd H
and the like), I add the statement
setenv (“SDL_ENABLEAPPEVENTS”, “1”, 1);
to the applicationDidFinishLoading: method in the
class SDLMain.

Next, I make sure Cocoa ignores keystrokes that do
not
involve the command key, as Cocoa won’t be able to
handle those; it’ll “beep” at you. If your users
don’t
mind a "beep"ing computer while they play games,
well,
you don’t need to do this next step! :stuck_out_tongue:

In the implementation of SDLApplication, I add the
following method, which overrides the sendEvent:
method in NSApplication:

  • (void)sendEvent:(NSEvent *)anEvent {
    if( NSKeyDown == [anEvent type] || NSKeyUp ==
    [anEvent type] ) {
    if( [anEvent modifierFlags] & NSCommandKeyMask )
    [super sendEvent: anEvent];
    } else
    [super sendEvent: anEvent];
    }

This seems to work, but I have only tried it in
one
application.

Thanks to the creators of the SDL Custom Cocoa
Application template. I would have never thought
of
setting SDL_ENABLEAPPEVENTS without it.

John Tanner

— Alexander Bussman wrote:

Hi!

I have a hopefully easy question.
I wonder if there is a simple way to implement
for

example Command-Q
(quit) and Command-H (hide) in a SDL application
on

OS X.

I haven’t found any information about how to do
this.

Thanks for your help
// Alexander Bussman


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

Oh, yeah you’re right I can minimize it and it beeps with
Cmd-anything-else :slight_smile:
Since I’m new to Mac programming (and xcode ofcourse) I don’t exactly
know what a .nib file is :slight_smile:
Is it a file that holds data on how the window should look (created
from the “GUI builder” (forgot the name of the program))?

// Alexander BussmanOn 2004-10-15, at 16.25, John Tanner wrote:

Are you using a .nib file?
I just tried my approach without a .nib file, and only
thing I could get the computer to recognize is Cmd-M
for minimize. You see, the .nib-file less program
didn’t even have menu options for Quit and Hide!

You should be able to make your program’s window
minimize by pressing Cmd-M and make the computer
"beep" by pressing Cmd-anything else. If so, try
converting your project to a nib-based one. Later
today, I’ll reconstruct how I did that, if you need
help.

John Tanner

— Alexander Bussman <@Alexander_Bussman> wrote:

I tried this approach now but it seams like it’s not
working.
Cmd-Q and Cmd-H doesn’t work.
Maybe I misunderstood you, but this is going to make
Cmd-Q and Cmd-H to
work without any calls from my event loop?

// Alexander Bussman

On 2004-10-14, at 19.33, John Tanner wrote:

I have been working on another approach to this
problem. My approach is for programs made using
Project Builder/XCode.

I add code to the SDLMain.m file of the project.

To get Cocoa to hear keystrokes (such as Cmd-Q,
Cmd H
and the like), I add the statement
setenv (“SDL_ENABLEAPPEVENTS”, “1”, 1);
to the applicationDidFinishLoading: method in the
class SDLMain.

Next, I make sure Cocoa ignores keystrokes that do
not
involve the command key, as Cocoa won’t be able to
handle those; it’ll “beep” at you. If your users
don’t
mind a "beep"ing computer while they play games,
well,
you don’t need to do this next step! :stuck_out_tongue:

In the implementation of SDLApplication, I add the
following method, which overrides the sendEvent:
method in NSApplication:

  • (void)sendEvent:(NSEvent *)anEvent {
    if( NSKeyDown == [anEvent type] || NSKeyUp ==
    [anEvent type] ) {
    if( [anEvent modifierFlags] & NSCommandKeyMask )
    [super sendEvent: anEvent];
    } else
    [super sendEvent: anEvent];
    }

This seems to work, but I have only tried it in
one
application.

Thanks to the creators of the SDL Custom Cocoa
Application template. I would have never thought
of
setting SDL_ENABLEAPPEVENTS without it.

John Tanner

— Alexander Bussman <@Alexander_Bussman> wrote:

Hi!

I have a hopefully easy question.
I wonder if there is a simple way to implement
for

example Command-Q
(quit) and Command-H (hide) in a SDL application
on

OS X.

I haven’t found any information about how to do
this.

Thanks for your help
// Alexander Bussman


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

.nib files tell Cocoa to initialize objects, such as
menus, windows, controller objects, etc. As you can
see, it handles both the GUI objects and the objects
that glue the GUI to your program.
Look into the Cocoa documentation at
developer.apple.com, or the information included in
/Developer/Documentation

Now, to making your program. I think the easiest way
would be to make a new project using the “SDL Cocoa
Application” template instead of the “SDL
Application” template. After that, copy your program
files (.h, .c, and so on) OTHER THAN SDLMain.h and
SDLMain.c from the old project to the new one. The new
SDLMain files will have some interesting features.

Modify the new SDLMain.m file as I suggested in
earlier posts, and build the program. You should be
able to use Cmd-Q and Cmd-H and so on. However, you
will see some new menu options (File|Open Game… and
so on). This is because the new project has added
methods and such to handle custom menu items. Once you
learn more about Cocoa programming, you can use them
as a starting point to making nice interface for the
OS X version of your software.

If you want, though, you can eliminate the menu items
by opening the file “SDLMain.nib”* in the new project,
clicking on the menu items in the sample menu that
will appear in the lower left of your screen, and
deleting them.

Good Luck!

John Tanner

*I realize I said “MainMenu.nib” before. The new
project is set up slightly differently.

— Alexander Bussman wrote:> Oh, yeah you’re right I can minimize it and it beeps

with
Cmd-anything-else :slight_smile:
Since I’m new to Mac programming (and xcode
ofcourse) I don’t exactly
know what a .nib file is :slight_smile:
Is it a file that holds data on how the window
should look (created
from the “GUI builder” (forgot the name of the
program))?

// Alexander Bussman

On 2004-10-15, at 16.25, John Tanner wrote:

Are you using a .nib file?
I just tried my approach without a .nib file, and
only
thing I could get the computer to recognize is
Cmd-M
for minimize. You see, the .nib-file less program
didn’t even have menu options for Quit and Hide!

You should be able to make your program’s window
minimize by pressing Cmd-M and make the computer
"beep" by pressing Cmd-anything else. If so, try
converting your project to a nib-based one. Later
today, I’ll reconstruct how I did that, if you
need
help.

John Tanner

— Alexander Bussman wrote:

I tried this approach now but it seams like it’s
not

working.
Cmd-Q and Cmd-H doesn’t work.
Maybe I misunderstood you, but this is going to
make

Cmd-Q and Cmd-H to
work without any calls from my event loop?

// Alexander Bussman

On 2004-10-14, at 19.33, John Tanner wrote:

I have been working on another approach to this
problem. My approach is for programs made using
Project Builder/XCode.

I add code to the SDLMain.m file of the project.

To get Cocoa to hear keystrokes (such as Cmd-Q,
Cmd H
and the like), I add the statement
setenv (“SDL_ENABLEAPPEVENTS”, “1”, 1);
to the applicationDidFinishLoading: method in
the

class SDLMain.

Next, I make sure Cocoa ignores keystrokes that
do

not

involve the command key, as Cocoa won’t be able
to

handle those; it’ll “beep” at you. If your users
don’t
mind a "beep"ing computer while they play games,
well,
you don’t need to do this next step! :stuck_out_tongue:

In the implementation of SDLApplication, I add
the

following method, which overrides the sendEvent:
method in NSApplication:

  • (void)sendEvent:(NSEvent *)anEvent {
    if( NSKeyDown == [anEvent type] || NSKeyUp ==
    [anEvent type] ) {
    if( [anEvent modifierFlags] & NSCommandKeyMask
    )
  	[super sendEvent: anEvent];

} else
[super sendEvent: anEvent];
}

This seems to work, but I have only tried it in
one
application.

Thanks to the creators of the SDL Custom Cocoa
Application template. I would have never thought
of
setting SDL_ENABLEAPPEVENTS without it.

John Tanner

— Alexander Bussman wrote:

Hi!

I have a hopefully easy question.
I wonder if there is a simple way to implement
for

example Command-Q
(quit) and Command-H (hide) in a SDL
application

on

OS X.

I haven’t found any information about how to do
this.

Thanks for your help
// Alexander Bussman


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Do you Yahoo!?
Declare Yourself - Register online to vote
today!

http://vote.yahoo.com


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail

Wow, thanks for all that useful information!
I really appreciate it, I will investigate it further tomorrow.

Thanks for your help!

// Alexander BussmanOn 2004-10-15, at 21.12, John Tanner wrote:

.nib files tell Cocoa to initialize objects, such as
menus, windows, controller objects, etc. As you can
see, it handles both the GUI objects and the objects
that glue the GUI to your program.
Look into the Cocoa documentation at
developer.apple.com, or the information included in
/Developer/Documentation

Now, to making your program. I think the easiest way
would be to make a new project using the “SDL Cocoa
Application” template instead of the “SDL
Application” template. After that, copy your program
files (.h, .c, and so on) OTHER THAN SDLMain.h and
SDLMain.c from the old project to the new one. The new
SDLMain files will have some interesting features.

Modify the new SDLMain.m file as I suggested in
earlier posts, and build the program. You should be
able to use Cmd-Q and Cmd-H and so on. However, you
will see some new menu options (File|Open Game… and
so on). This is because the new project has added
methods and such to handle custom menu items. Once you
learn more about Cocoa programming, you can use them
as a starting point to making nice interface for the
OS X version of your software.

If you want, though, you can eliminate the menu items
by opening the file “SDLMain.nib”* in the new project,
clicking on the menu items in the sample menu that
will appear in the lower left of your screen, and
deleting them.

Good Luck!

John Tanner

*I realize I said “MainMenu.nib” before. The new
project is set up slightly differently.

— Alexander Bussman <@Alexander_Bussman> wrote:

Oh, yeah you’re right I can minimize it and it beeps
with
Cmd-anything-else :slight_smile:
Since I’m new to Mac programming (and xcode
ofcourse) I don’t exactly
know what a .nib file is :slight_smile:
Is it a file that holds data on how the window
should look (created
from the “GUI builder” (forgot the name of the
program))?

// Alexander Bussman

On 2004-10-15, at 16.25, John Tanner wrote:

Are you using a .nib file?
I just tried my approach without a .nib file, and
only
thing I could get the computer to recognize is
Cmd-M
for minimize. You see, the .nib-file less program
didn’t even have menu options for Quit and Hide!

You should be able to make your program’s window
minimize by pressing Cmd-M and make the computer
"beep" by pressing Cmd-anything else. If so, try
converting your project to a nib-based one. Later
today, I’ll reconstruct how I did that, if you
need
help.

John Tanner

— Alexander Bussman <@Alexander_Bussman> wrote:

I tried this approach now but it seams like it’s
not

working.
Cmd-Q and Cmd-H doesn’t work.
Maybe I misunderstood you, but this is going to
make

Cmd-Q and Cmd-H to
work without any calls from my event loop?

// Alexander Bussman

On 2004-10-14, at 19.33, John Tanner wrote:

I have been working on another approach to this
problem. My approach is for programs made using
Project Builder/XCode.

I add code to the SDLMain.m file of the project.

To get Cocoa to hear keystrokes (such as Cmd-Q,
Cmd H
and the like), I add the statement
setenv (“SDL_ENABLEAPPEVENTS”, “1”, 1);
to the applicationDidFinishLoading: method in
the

class SDLMain.

Next, I make sure Cocoa ignores keystrokes that
do

not

involve the command key, as Cocoa won’t be able
to

handle those; it’ll “beep” at you. If your users
don’t
mind a "beep"ing computer while they play games,
well,
you don’t need to do this next step! :stuck_out_tongue:

In the implementation of SDLApplication, I add
the

following method, which overrides the sendEvent:
method in NSApplication:

  • (void)sendEvent:(NSEvent *)anEvent {
    if( NSKeyDown == [anEvent type] || NSKeyUp ==
    [anEvent type] ) {
    if( [anEvent modifierFlags] & NSCommandKeyMask
    )
  	[super sendEvent: anEvent];

} else
[super sendEvent: anEvent];
}

This seems to work, but I have only tried it in
one
application.

Thanks to the creators of the SDL Custom Cocoa
Application template. I would have never thought
of
setting SDL_ENABLEAPPEVENTS without it.

John Tanner

— Alexander Bussman <@Alexander_Bussman> wrote:

Hi!

I have a hopefully easy question.
I wonder if there is a simple way to implement
for

example Command-Q
(quit) and Command-H (hide) in a SDL
application

on

OS X.

I haven’t found any information about how to do
this.

Thanks for your help
// Alexander Bussman


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Do you Yahoo!?
Declare Yourself - Register online to vote
today!

http://vote.yahoo.com


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl