Author Topic: Managed HotKeys  (Read 54466 times)

0 Members and 1 Guest are viewing this topic.

FengK

  • Guest
Re: Managed HotKeys
« Reply #75 on: June 20, 2008, 07:32:20 PM »
Can you post your code?  I can muddle my way through Python code.  I might be able to identify the problem.

please see attached. i just started it and it is far from being a completed solution.

Chuck Gabriel

  • Guest
Re: Managed HotKeys
« Reply #76 on: June 20, 2008, 08:22:36 PM »
Can you post your code?  I can muddle my way through Python code.  I might be able to identify the problem.

please see attached. i just started it and it is far from being a completed solution.

I didn't understand all of your code, but I did pick up on a couple of things.  The example program that comes with pyHook says to return False if you don't want the event to propagate to other handlers.  I changed your code in a couple of places.  Where you check to see if AutoCAD is active, you call the pass statement.  I replaced that with "return True."  That way the event will immediately get passed to the next handler, and the hook procedure will stop executing if AutoCAD isn't active.  Then I added "return False" as the last line of your elif clause so that no additional handlers will see the event.  I hope it works for you.


FengK

  • Guest
Re: Managed HotKeys
« Reply #77 on: June 21, 2008, 04:20:55 AM »
Thanks a lot Chuck. I'll test your revision Monday and report back. Have a good weekend.

FengK

  • Guest
Re: Managed HotKeys
« Reply #78 on: June 23, 2008, 01:44:15 PM »
Chuck, your revision worked! Thanks again. Now I'll work on reading the hotkey definition file. For now, I'll just use a text file and the input will be something like

Alt+D COXD
Alt+F LAYERP
Ctrl+Shift+W MAXWIN
...
...


kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2140
  • class keyThumper<T>:ILazy<T>
Re: Managed HotKeys
« Reply #79 on: July 07, 2009, 02:35:08 AM »

Has anyone tried Hotkeys in AC2010.

In 2010 Mechanical the cursor seems to freeze for a few seconds after the shortcut is pressed ...
I haven't tried in Vanilla  will have a look at home tonight ...

Regards
Kerry
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Managed HotKeys
« Reply #80 on: July 07, 2009, 04:14:12 AM »

Say the definition is ALT+E for _ENDPOINT

The cursor actually locks up.
Press ESC and the selection continues with the correct snap set.

too brain dead to have a further look at it tonight  :|
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

FengK

  • Guest
Re: Managed HotKeys
« Reply #81 on: July 07, 2009, 04:25:05 AM »
oh, who has the latest version? can you post it here? I tried the link from this post and it didn't work. thanks.

Chuck Gabriel

  • Guest
Re: Managed HotKeys
« Reply #82 on: July 07, 2009, 09:23:21 AM »

Say the definition is ALT+E for _ENDPOINT

The cursor actually locks up.
Press ESC and the selection continues with the correct snap set.

too brain dead to have a further look at it tonight  :|

I'm not sure if this is the same problem you are experiencing, but I had a similar problem when I tested on AutoCAD 2009 if the menubar was displayed.  The Alt key was trying to activate the pulldown menus.  Here is the binary that fixes that bug.


Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Managed HotKeys
« Reply #83 on: July 07, 2009, 04:10:02 PM »


Thanks Chuck, works a treat !

Your generosity is truly appreciated.

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

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Managed HotKeys
« Reply #84 on: June 27, 2010, 06:03:18 AM »

Seemed best to resurrect this rather than start a new thread.

Has anyone got a .dll for Hotkeys working in Win 7 64 bit with ACAD2011 ( actually ACADMechanical 2011).

The ac2010 build seems to load without complaining but the commands are not registered.

This is a shiny new box so there are no residuals . (has .Net 4.0 installed )
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Chuck Gabriel

  • Guest
Re: Managed HotKeys
« Reply #85 on: June 27, 2010, 10:05:24 AM »
I wish I could test that for you, but I don't have Windows 7 or AutoCAD 2011.  I wonder if maybe UAC is blocking the required registry changes.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Managed HotKeys
« Reply #86 on: June 27, 2010, 06:00:21 PM »

Hello Chuck,
I tried disabling the UAC last night. no joy.

I'll have another look tonight.

Thanks

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

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Managed HotKeys
« Reply #87 on: June 27, 2010, 06:13:17 PM »
I wonder if the issue is similar to if not the same as the one being resolved here:

http://www.theswamp.org/index.php?topic=19980.msg392352#msg392352
Be your Best


Michael Farrell
http://primeservicesglobal.com/

Chuck Gabriel

  • Guest
Re: Managed HotKeys
« Reply #88 on: June 27, 2010, 07:21:08 PM »

Hello Chuck,
I tried disabling the UAC last night. no joy.

I'll have another look tonight.

Thanks

Kerry.

You've probably already thought of this too, but is the dll on a local drive or a network share?  Also, have you stepped through the entry point in the debugger?

One more thing.  When you said the commands weren't registered, I assumed you meant the demand loading entries weren't added to the registry.  Did you actually mean that the commands don't work even when you manually load the dll?
« Last Edit: June 27, 2010, 07:25:21 PM by Chuck Gabriel »

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8712
  • AKA Daniel
Re: Managed HotKeys
« Reply #89 on: June 28, 2010, 07:26:32 PM »
Hi Kerry, get this working? My guess, its throwing @ IExtensionApplication.Initialize... remind me where the code is and I will look :)