From: <c99...@us...> - 2006-11-13 22:38:20
|
Revision: 380 http://svn.sourceforge.net/cadcdev/?rev=380&view=rev Author: c99koder Date: 2006-11-12 15:01:37 -0800 (Sun, 12 Nov 2006) Log Message: ----------- Add F-key constants Modified Paths: -------------- tiki/include/Tiki/hid.h tiki/osx/src/plathid.mm Modified: tiki/include/Tiki/hid.h =================================================================== --- tiki/include/Tiki/hid.h 2006-10-19 00:20:31 UTC (rev 379) +++ tiki/include/Tiki/hid.h 2006-11-12 23:01:37 UTC (rev 380) @@ -78,6 +78,18 @@ KeyDelete, KeyPgup, KeyPgdn, + KeyF1, + KeyF2, + KeyF3, + KeyF4, + KeyF5, + KeyF6, + KeyF7, + KeyF8, + KeyF9, + KeyF10, + KeyF11, + KeyF12, KeyUnknown, KeySentinel }; Modified: tiki/osx/src/plathid.mm =================================================================== --- tiki/osx/src/plathid.mm 2006-10-19 00:20:31 UTC (rev 379) +++ tiki/osx/src/plathid.mm 2006-11-12 23:01:37 UTC (rev 380) @@ -84,6 +84,30 @@ return Event::KeyPgup; case NSPageDownFunctionKey: return Event::KeyPgdn; + case NSF1FunctionKey: + return Event::KeyF1; + case NSF2FunctionKey: + return Event::KeyF2; + case NSF3FunctionKey: + return Event::KeyF3; + case NSF4FunctionKey: + return Event::KeyF4; + case NSF5FunctionKey: + return Event::KeyF5; + case NSF6FunctionKey: + return Event::KeyF6; + case NSF7FunctionKey: + return Event::KeyF7; + case NSF8FunctionKey: + return Event::KeyF8; + case NSF9FunctionKey: + return Event::KeyF9; + case NSF10FunctionKey: + return Event::KeyF10; + case NSF11FunctionKey: + return Event::KeyF11; + case NSF12FunctionKey: + return Event::KeyF12; default: return -1; } @@ -178,7 +202,7 @@ unichar c = [chs characterAtIndex: i]; int ch; - if ((c & 0xff00) == (NSUpArrowFunctionKey & 0xff00) || c == 27) { + if ((c & 0xff00) == (NSUpArrowFunctionKey & 0xff00) || c == 27 || (c >= NSF1FunctionKey && c <= NSF12FunctionKey)) { ch = translateFn(c); if (ch < 0) return; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |