Jul 21, 2004, 09:41 AM
Jul 21, 2004, 10:17 AM
power
Jul 21, 2004, 10:20 AM
Very nice
. But seriously, am I able to use all the other buttons.

Jul 21, 2004, 10:52 AM
as far as I am aware of
Jul 21, 2004, 11:05 AM
But you should consider stuff like not using Fkeys(becouse of the powerbook thing), and not keys you easily do other stuff with(I remeber a FPS game where you ran with the command key and switched weapons with the Q buttonÖ It didn't work too good.)
Jul 21, 2004, 11:07 AM
Alright thanks.
Jul 21, 2004, 12:11 PM
I read somewhere (here? CMG?) that Cocoa has problems if you press CMD+an arrow key (the arrow key gets "stuck")
Jul 21, 2004, 12:14 PM
actually it is command and any key. but this is only a problem if you input keys a certain way (namely ignoring modifers). I believe arekkusu has the fix for said problem
Jul 22, 2004, 07:43 PM
Some issues I've ran into:
Powerbooks also don't have a separate keypad. Yes, you can hit numlock and use 789-uio-jkl on your keyboard, but it doesn't feel right at all. If you map controls to the keypad, make sure you mirror them to the arrow keys (or just let the player change them.)
You can only have 2 keys pressed simultaneously on your keyboard. The third doesn't register at all. Keys that DON'T count toward this are F-keys, arrow keys and the keypad.
Powerbooks also don't have a separate keypad. Yes, you can hit numlock and use 789-uio-jkl on your keyboard, but it doesn't feel right at all. If you map controls to the keypad, make sure you mirror them to the arrow keys (or just let the player change them.)
You can only have 2 keys pressed simultaneously on your keyboard. The third doesn't register at all. Keys that DON'T count toward this are F-keys, arrow keys and the keypad.
Jul 22, 2004, 08:55 PM
You can fix the Cmd key problem in Cocoa if you subclass NSApp and override sendEvent. I think the thread for that got lost in the downtime, but the code is in Shoot Things if anyone needs it.
So, you can use any key, but you should be aware that not all keyboards have all keys. F13 F14 F15, for example. Or Ã’ is a key on a Spanish keyboard but a dead key combo on a US keyboard.
The number of simultaneous keypresses that register varies depending on the keyboard. It's two on old machines, eight on my powerbook.
So, you can use any key, but you should be aware that not all keyboards have all keys. F13 F14 F15, for example. Or Ã’ is a key on a Spanish keyboard but a dead key combo on a US keyboard.
The number of simultaneous keypresses that register varies depending on the keyboard. It's two on old machines, eight on my powerbook.
Jul 22, 2004, 11:49 PM
arekkusu Wrote:You can fix the Cmd key problem in Cocoa if you subclass NSApp and override sendEvent. I think the thread for that got lost in the downtime, but the code is in Shoot Things if anyone needs it.Yeah, I think that thread is toast. Here's a quick code snippet to fix the command key-up issue.
Code:
// -paste this anywhere in your Cocoa code
// -to override NSApplication use the Target's inspector to set Principle Class:
// to KeyUpOverride
// -return it to NSApplication if this is removed
@interface KeyUpOverride : NSApplication {
}
@end
@implementation KeyUpOverride
- (void)sendEvent:(NSEvent *)anEvent
{
if( [anEvent type] == NSKeyUp )
{
[[[self mainWindow] firstResponder] tryToPerform:@selector(keyUp:) with:anEvent];
return;
}
[super sendEvent:anEvent];
}
@end