Hot Door CORE Forum
Detecting user keyboard press - Printable Version

+- Hot Door CORE Forum (http://hotdoorcore.com/forum)
+-- Forum: All forums (http://hotdoorcore.com/forum/forumdisplay.php?fid=1)
+--- Forum: Getting started (http://hotdoorcore.com/forum/forumdisplay.php?fid=6)
+--- Thread: Detecting user keyboard press (/showthread.php?tid=10)



Detecting user keyboard press - VincentDoan - 03-12-2014

I have a need to detect user pressing a key on the keyboard.
I plan to use Cocoa key event. Is this wise??? Since CORE do not have such support.


RE: Detecting user keyboard press - garrett - 03-13-2014

(03-12-2014, 10:33 AM)VincentDoan Wrote: I have a need to detect user pressing a key on the keyboard.
I plan to use Cocoa key event. Is this wise??? Since CORE do not have such support.

Since we have not tried this yet, I can't really provide much information. It's obvious that Illustrator is tracking keypresses, because a simple keypress without a modifier (e.g. "v") will select a tool. You might run into trouble trying to track keypresses as a plugin running inside of Illustrator simply because Illustrator is already doing so.

If you try it, let us know how it goes!


RE: Detecting user keyboard press - VincentDoan - 03-13-2014

My plug-in, currently available for Window only (Cs4, CS5) use key detection via a timer and AI key tracking suite. It configures 3 additional modifier key beside CMD, control, shift, alt to do cool stuff.
It relies heavily on this, I must continue to support it going forward. Have you ever try Cocoa as dll and have AI loads it. This way .aip can use it as a service to get keyboard event. For Windows, dll is easy to do, I am not a Mac guy, any help would be greatly appreciated.
I will be talking to Brendon tomorrow, trying to convince him and you to add an option to not undo during mouse event. I really need this functionality, otherwise my plug-in would not be the same. Would it be too much to ask to add this option? Users like to add anchors to segments and drag them out without having to mouse up and down again before dragging the anchors. This is to speed up extensive path editing tasks.

Thank you Garrett,

Vincent