Author Topic: Managed HotKeys  (Read 14698 times)

0 Members and 1 Guest are viewing this topic.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11000
  • class keyThumper<T>:ILazy<T>
Re: Managed HotKeys
« Reply #120 on: November 17, 2010, 06:49:21 am »
Here we go !

« Last Edit: November 17, 2010, 06:57:57 am by Kerry »
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate<--

Jeff Moran

  • Mosquito
  • Posts: 11
Re: Managed HotKeys
« Reply #121 on: November 18, 2010, 03:37:21 pm »
Thanks Guys!

Jeff Moran

  • Mosquito
  • Posts: 11
Re: Managed HotKeys
« Reply #122 on: November 18, 2010, 03:43:15 pm »
Oops!
I forgot to say it works great!
Thanks again!

Tom

  • Newt
  • Posts: 98
Re: Managed HotKeys
« Reply #123 on: May 30, 2012, 05:46:42 pm »
Has anyone done a compile for 2013 they can post?

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11000
  • class keyThumper<T>:ILazy<T>
Re: Managed HotKeys
« Reply #124 on: May 30, 2012, 06:10:34 pm »

I was planning on doing one over the weekend Tom.

Regards
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate<--

Chuck Gabriel

  • Water Moccasin
  • Posts: 2011
Re: Managed HotKeys
« Reply #125 on: May 30, 2012, 06:47:17 pm »
Remind me to give you a raise. :-)
Windows 7 Ultimate x64 and no CAD software whatsoever

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11000
  • class keyThumper<T>:ILazy<T>
Re: Managed HotKeys
« Reply #126 on: May 31, 2012, 04:30:35 am »

OK :-D
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate<--

BlackBox

  • Gator
  • Posts: 3104
Re: Managed HotKeys
« Reply #127 on: May 31, 2012, 12:53:57 pm »
Just came across this thread for the first time, and HotKeys sounds really interesting.

I downloaded Kerry's files from here, and Netloaded the ..\Release\*.dll (which seems to load fine), yet I am apparently missing something:

Code: [Select]
Command: editkeys

Editor not found.

Is there any one place to acquire the full application (i.e., all files needed), or do I need to piece-meal it from the previous 8 pages?

FWIW... Using Civil 3D 2011, and 2012.

**Edit - Just remembered the post(s) about editing the XML manually... Perhaps I'm just doing this wrong... Do I modify the HOTKEYS.XML file (or a copy of)? And if so, what does VirtualKey 88 correlate to on the keyboard (for example)? *lost*

TIA
« Last Edit: May 31, 2012, 12:58:27 pm by RenderMan »
"Potential has a shelf life." - Margaret Atwood

BlackBox

  • Gator
  • Posts: 3104
Re: Managed HotKeys
« Reply #128 on: May 31, 2012, 01:08:44 pm »
I downloaded Kerry's files from here, and Netloaded the ..\Release\*.dll (which seems to load fine), yet I am apparently missing something:

Code: [Select]
Command: editkeys

Editor not found.

*Doh!* - After reading 9 pages, I forgot this in the first post :lol: :

The editor isn't in the zip file, so expect the editkeys command to flop if you don't already have an older version of HotKeys installed.
"Potential has a shelf life." - Margaret Atwood

BlackBox

  • Gator
  • Posts: 3104
Re: Managed HotKeys
« Reply #129 on: May 31, 2012, 01:24:20 pm »
**Edit - Just remembered the post(s) about editing the XML manually... Perhaps I'm just doing this wrong... Do I modify the HOTKEYS.XML file (or a copy of)? And if so, what does VirtualKey 88 correlate to on the keyboard (for example)? *lost*

Okay, I did the responsible thing, and Google VirtualKey codes for myself, and found this, which is helpful.

However, An attempt to activate this HotKey:

Code: [Select]
  <HotKey>
    <!--Alt ???-->
    <Modifiers>1</Modifiers>
    <!--C ???-->
    <VirtualKey>67</VirtualKey>
    <Command>_CEN </Command>
  </HotKey>

... Results in a fatal error; what am I missing???  :? (HotKeys Noob)
« Last Edit: May 31, 2012, 02:59:30 pm by RenderMan »
"Potential has a shelf life." - Margaret Atwood

BlackBox

  • Gator
  • Posts: 3104
Re: Managed HotKeys
« Reply #130 on: May 31, 2012, 01:50:08 pm »
Now I've done it... Ever since the first fatal error, Civil 3D isn't even starting properly. If I do get it to start without immediately having a fatal error, this is the error I get:

I've tried deleting all of the registry keys for ManagedHotKeys, and Civil 3D still won't work properly.  :pissed:
« Last Edit: May 31, 2012, 02:56:21 pm by RenderMan »
"Potential has a shelf life." - Margaret Atwood

BlackBox

  • Gator
  • Posts: 3104
Re: Managed HotKeys
« Reply #131 on: May 31, 2012, 02:55:00 pm »
I was seriously freaking out... Not sure how/why, but apparently Communication Center was causing this error (not sure if HotKeys interacts with that or not, really?).

Came across this thread (post #9), changed the registry key to 18.1 (2011), and manually edited the "LastUpdateTimeLoWord" DWord = 0.



Now that that is taken care of...

If necessary I can make changes to the XML file for anyone who has problems.
.... may be a good chance to explain the actual structure :)

... Yes, please. *raises hand* :-D
"Potential has a shelf life." - Margaret Atwood

BlackBox

  • Gator
  • Posts: 3104
Re: Managed HotKeys
« Reply #132 on: May 31, 2012, 03:55:03 pm »
While there are several warnings, the solution does build successfully.

I've made a minor code update in an effort to prevent fatal errors when I invoke a HotKey:

Code - C#: [Select]
  1.        public void Install()
  2.        {
  3.            m_hHook = SetWindowsHookEx(
  4.                m_hookType,
  5.                m_hookProc,
  6.                IntPtr.Zero,
  7.                //(int)AppDomain.GetCurrentThreadId());
  8.                (int)System.Threading.Thread.CurrentThread.ManagedThreadId);
  9.        }
  10.  

The resultant build does load fine, and also prevents the previous fatal errors, however, the HotKeys are not functional.

When attempting to use Alt + C (for _CEN), the Menubar is activated as though you only pressed Alt. Menubar=0 results in the Alt options for the ribbon. Closing the Ribbon results in the Alt options for the Quick Access Toolbar (QAT). Removing all items from the QAT results in the Alt option for the Menu Browser.

*stuck*
"Potential has a shelf life." - Margaret Atwood

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11000
  • class keyThumper<T>:ILazy<T>
Re: Managed HotKeys
« Reply #133 on: May 31, 2012, 05:02:05 pm »


Renderman,
I don't have C3D on any of my machines.

I made changes last night and recompiled for 2013.
The basic app works fine in vanilla AutoCAD when netloaded.
I just need to make the required changes to the registry read/write code ( due to API changes).

Sounds like it's time to pull my finger out and re-write the editor as well ... perhaps it's a good excuse for a full re-write.

Regards
Kerry
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate<--

BlackBox

  • Gator
  • Posts: 3104
Re: Managed HotKeys
« Reply #134 on: May 31, 2012, 06:54:04 pm »
Understood... I'd be happy to contribute at your discretion (Civil 3D, Map 3D, and AMEP debugging, etc., as I am learning to code in C# for my night job), and learn (from someone much, much smarter than I) at the same time.! LoL

Cheers, Kerry!
"Potential has a shelf life." - Margaret Atwood