Are Mac and Windows key codes the same?

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Are Mac and Windows key codes the same?

Post by heyvern »

I want to track the "save" key commands. In order to do this I need to check for "s" key (cntrl + s).

AS only gets the key code so I get a "115" for the s on the Mac. Is this the same on Windows?

This is how I plan to "save" bone group information to a file in the same folder with the anime studio file. This bone group file is read back in when the file is opened.

I would check myself but the power supply blew on my PC and I haven't replaced it yet.

-vern
User avatar
mkelley
Posts: 1647
Joined: Fri Nov 02, 2007 5:29 pm
Location: Sunny Florida
Contact:

Post by mkelley »

Vern,

If no one else replies I'd be glad to test for you, but in examining the scripts (I'm a programmer but have zero experience with LUA) I don't find any getkey type function to let you know (and the globals and API scripts don't seem to show this key combo).

LUA looks interesting, though.
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Thanks but I got it figured out. It is the ASCII code so the "s" is the same for mac and windows.

I will post the script/s for anyone who wants to try it out probably tomorrow or monday if I can't figure out the latest bug.

-vern
Post Reply