TheSwamp

CAD Forums => CAD General => Topic started by: hudster on November 08, 2004, 05:37:06 AM

Title: Custom keyboard
Post by: hudster on November 08, 2004, 05:37:06 AM
In the distant past I customised my Keyboard so that when i pressed the F4 key it opened/closed the properties dialogue box.

But after being off sick for a week, I came in today and someone has re-set my autocad back to vanila, but no-one will admit to it.

I re-set my saved profile and everything is back, except my custom keyboard commands but I can't remember how I did it.

Anyone have an Idea on how this is done?
Title: Custom keyboard
Post by: MikePerry on November 08, 2004, 05:57:18 AM
Hi

Look at the ***ACCELERATORS section within the Acad.mnu file.

+

Check out the following Technical Documents on the Autodesk web site under the Knowledge Base section -

ID: TS22496 - Create accelerator keys (keyboard shortcuts) for commands (http://usa.autodesk.com/adsk/servlet/ps/item?siteID=123112&id=2862800&linkID=2475323)

ID: TS20858 - Assign an AutoLISP® routine to a shortcut key (http://usa.autodesk.com/adsk/servlet/ps/item?siteID=123112&id=2867853&linkID=2475323)

Have a good one, Mike
Title: Custom keyboard
Post by: hudster on November 08, 2004, 07:32:21 AM
If I have a custom menu, can I add a menu accelerators section to that mnu file?
Title: Custom keyboard
Post by: Dommy2Hotty on November 08, 2004, 10:16:26 AM
Quote from: Hudster
If I have a custom menu, can I add a menu accelerators section to that mnu file?


No...accelerators can only be coded in the base menu file...
Title: Custom keyboard
Post by: ML on November 08, 2004, 10:27:01 AM
I don't believe that to be true


This code is straight from my Custom Menu

Code: [Select]

***ACCELERATORS
[CONTROL+SHIFT+"C"]^C^Cstart;Calc;
[CONTROL+SHIFT+"E"]^C^Cstart;explorer;
Title: Custom keyboard
Post by: Dommy2Hotty on November 08, 2004, 10:41:23 AM
Quote from: ML
I don't believe that to be true


This code is straight from my Custom Menu

Code: [Select]

***ACCELERATORS
[CONTROL+SHIFT+"C"]^C^Cstart;Calc;
[CONTROL+SHIFT+"E"]^C^Cstart;explorer;


Hmmm...I thought only Toolbars, POPs, and Helpstrings were available in partial menus...
Title: Custom keyboard
Post by: ML on November 08, 2004, 07:20:16 PM
Nope, you have the same flexibilty as The base acad menu. After all, they are both the same file types.

I prefer to use the .mns file. I never modify, load or even save the .mnu file except for the acad.mnu file

Mark
Title: Custom keyboard
Post by: hudster on November 09, 2004, 04:34:44 AM
Why wont this work?

Code: [Select]
//
//
//My_Shortcuts_menu_file
//
//
***pop 101
**Main
Props [Properties]_properties


//
//Accelerator Shortcut Keys
//
***ACCELERATORS
Props ["F4"]
Title: Custom keyboard
Post by: ML on November 09, 2004, 06:53:02 AM
Well, here is a few examples from The acad.mns file ---->
May be you need to try Props [ALT+"F4"]


ID_dbConnect   [CONTROL+"6"]
ID_VBAIDE      [ALT+"F11"]
Title: Custom keyboard
Post by: ML on November 09, 2004, 06:57:01 AM
Hudster,

I think you may need to write it like this -->

[ALT+"F11"]^C^C_properties;
Title: Custom keyboard
Post by: MikePerry on November 09, 2004, 07:03:39 AM
Quote from: Hudster
Why wont this work?

Hi

What is your Menu File called?

Below example assumes Custom.mnu

***MENUGROUP=CUSTOM

***POP101
**MAIN
ID_CusMain  [Main]
ID_CusProps  [Properties]^C^C_.Properties

***ACCELERATORS
ID_CusProps  ["F4"]

The above works, did for me just a minute ago when tested here.

Have a good one, Mike
Title: Custom keyboard
Post by: ML on November 09, 2004, 07:08:06 AM
Mine is simply called Custom1, I have had the same Custom menu for like 2.5 years or so but I change it a lot

So,  what part of your menu worked? Or, did you say it is all working now?

Let me know if you need more help

Mark
Title: Custom keyboard
Post by: MikePerry on November 09, 2004, 07:15:11 AM
Quote from: ML
So,  what part of your menu worked? Or, did you say it is all working now?

Hi Mark

My "Menu Name" question was directed to "Hudster", apologies for any confusion on that front.

The Menu sample I posted should work (worked for me here when I tested).

Cheers, Mike
Title: Custom keyboard
Post by: hudster on November 09, 2004, 07:39:31 AM
I copied your "custom menu" and created a new mnu file.  but when ever I hit F4, it still says configure tablet.

When i did this before it didn't involve menus, it was done some other way.
Title: Custom keyboard
Post by: MikePerry on November 09, 2004, 07:46:09 AM
Quote from: Hudster
I copied your "custom menu" and created a new mnu file.  but when ever I hit F4, it still says configure tablet.

Hi

Did you save the menu file as Custom.mnu or Custom.mns ?

My simple offerring will only work if you saved the menu file as one of the above.

Have a good one, Mike
Title: Custom keyboard
Post by: hudster on November 09, 2004, 09:20:15 AM
I saved it as a MNU file, and when i added the menu it dreated it's own msn file etc.
Title: Custom keyboard
Post by: ML on November 09, 2004, 09:51:20 AM
To go back to what I was sayinga while back, there is no need to keep your Custom.mnu file around as it does not get updated unless you "manually" change it. The mnu only serves as a possible way to over write your custom Menu.

I would keep only The .mns around.

When you menuload it, it will create the .mnr and .mnc files

Mark
Title: Custom keyboard
Post by: Dommy2Hotty on November 09, 2004, 10:12:03 AM
Quote from: ML
To go back to what I was sayinga while back, there is no need to keep your Custom.mnu file around as it does not get updated unless you "manually" change it. The mnu only serves as a possible way to over write your custom Menu.

I would keep only The .mns around.

When you menuload it, it will create the .mnr and .mnc files

Mark


I never liked that view of using just the .mns file.  I mean, you're letting AutoCAD write to a file you've spent time coding.  The ONLY thing I let AutoCAD code for me is toolbars.  But even then I pull out the code from the .mns (which is created from the new .mnu I create specifically for making a new toolbar) and recode the bitmaps to the ones I made.  Just my 2¢...
Title: Custom keyboard
Post by: MikePerry on November 09, 2004, 10:22:05 AM
Quote from: Hudster
I saved it as a MNU file, and when i added the menu it dreated it's own msn file etc.

Hi

But what did you call / name it?

The offering I made needs to be saved as Custom.mnu or Custom.mns to work, if you called / named it something else it won't work.

Have a good one, Mike
Title: Custom keyboard
Post by: hudster on November 09, 2004, 10:46:31 AM
I called it custom.mnu.

Would I have to change the AutoCAD menu so that the tablet was disassociated from the F$ key?
Title: Custom keyboard
Post by: MikePerry on November 09, 2004, 12:20:15 PM
Hi

The following is what I done here when testing -

AutoCAD Base Menu -> Acad.mnu

Created Partial Menu -> Custom.mnu (contents exactly as I posted previous)

Loaded Partial Menu "Custom.mnu" via MenuLoad command.

Once loaded, hit function key "F4" -> Properties command run's.

Have uploaded Custom.mnu to the Lilly Pond for your reference -

http://www.theswamp.org/lilly_pond/mikeperry/Custom.mnu?nossi=1

Have a good one, Mike
Title: Custom keyboard
Post by: ronjonp on November 09, 2004, 12:28:33 PM
Can a custom command be added to right click menu (pop500*) via a custom menu?

Ron
Title: Custom keyboard
Post by: M-dub on November 09, 2004, 12:36:17 PM
Quote from: ronjonp
Can a custom command be added to right click menu (pop500*) via a custom menu?

Ron


Don't you mean POP0?  (maybe not...I'm just asking)  If so, then the answer to your question is yes.
Title: Custom keyboard
Post by: MikePerry on November 09, 2004, 12:37:15 PM
Hi

Do you receive / read AUGIWorld (available via the AUGI web site).... There is a great article written by Robert Bell in the "Jul/Aug 2004" issue starting on Page 14 -

Modifying AutoCAD’s Context Menus

I highly recommend you read that article.

+

The following Technical Document from the Autodesk web site might be worth a read -

ID: TS31003 - Customizing the content shortcut menus in AutoCAD 2000 (http://usa.autodesk.com/adsk/servlet/ps/item?siteID=123112&id=2878886&linkID=2475323)

Have a good one, Mike
Title: Custom keyboard
Post by: ronjonp on November 09, 2004, 01:21:35 PM
Pop502 is what I want to add to. I have done this in the acad.mns but wanted to know if this could be accomplished through a custom.mns. I did not see an article by Robert Bell in the issue you specified. From my tests, the answer is no.

Thanks,

Ron
Title: Custom keyboard
Post by: MikePerry on November 09, 2004, 01:25:49 PM
Quote from: ronjonp
I did not see an article by Robert Bell in the issue you specified. From my tests, the answer is no.

Hi

The article is there (honest), I've got it open on that page right now.

The article will give you all the information you require to accomplish the task (it can be done).

Have a good one, Mike
Title: Custom keyboard
Post by: ronjonp on November 09, 2004, 01:36:17 PM
I found it......I downloaded the Jul/Aug 2003 issue  :oops: . Thanks.

Ron