Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Disable "Repeat last command" or disable Space bar as enter key

6 REPLIES 6
Reply
Message 1 of 7
Anonymous
3826 Views, 6 Replies

Disable "Repeat last command" or disable Space bar as enter key

 TLDR: The Space Bar acts as Enter key, I want to disable that.

 

Hello,

     First, english isn´t my native language, so sorry for any mistakes. Now...

 

     I work a lot with AutoHotkey and it makes my work in AutoCad, Python, Office, and the Adobe Suite very fast, but I recently found a problem that´s killing my workflow in Autocad.

     My mouse has a hard time holding the Middle click, so when working in AutoCad, I remapped the Space Bar to work as the Middle Click button of the mouse, both for moving and 3D rotating the current view. I chose the Space Bar because it has a similar function in the Adobe Suite, and learning a different method would really impact my workflow. For example, hitting the \ on Illustrator will draw a line, and I find that much faster than presing L and then enter on Autocad... I´ll attach my AutoHotkey script later so if anyone knows AutoHotkey, they may understand what I´m doing, but that's not the issue.

     THE ISSUE: is that after I 3D rotate, Autocad sends a Space Bar click, which promptly repeats the last command I used. So I will 3D rotate and after I´m done, it sends a random command like Extrude, Line, Circle, CUI, Preferences, etc, whatever I used last.

---------------------------------------------------------------------------------------

     What I want to know is if there a way to disable the Space Bar function as an Enter Key. I know it´s really comfortable for a lot of people, but I DO NOT WANT the Space Bar to work as an Enter Key; and if thats not possible, I´d like to disable the repetition of the last command used when pressing Enter or the Space Bar.

---------------------------------------------------------------------------------------

 

Thanks a lot in advance, I´ll be pasting my AutoHotkey script after this if anyone wants to check it.

 

 

 

; This simulates the use of the Middle Click button in Autocad. It works by pressing the Space Bar and holding it down.

Space::                                                      
    Send, {Mbutton down}                                 ; Here I hold down the Middle Click Button
    While GetKeyState("Space","P")                 ; This keeps the code running as long as the space bar is pressed
    {
        sleep10
        
    }
    Send, {MButton up}                                   ; When the space bar is released, it releases the Middle Button. This does not result in Autocad repeating the last command sent. The issue appears in the next funtion:
return                                                      
 
; This is the code that bugs me, but it works just like the one above it. When pressing Shift+Space, it simulates the Shift+Middle Click in Autocad, but for some reason, at the end, AutoCad thinks I´m still pressing the Space Bar and it repeats the last command used in Autocad
+Space::                                                    
Send, {Shift down}{Mbutton down}
While GetKeyState("Space","P")
{
    sleep10
    
}
Send, {Shift up} {MButton up}
return
 

; This works by pressing the \ key, and it sends the Line command in AutoCad
:*:\::
send, line
send, {Enter}
return

; This works by pressing Control+r, and it sends the Rectang command in Autocad
^r::
    send, rectang{Enter}
return

; This work by pressing Control+Shift+S, so it writes the SaveAs command in AutoCad, same as in most other software
^+s::
    send, saveas{Enter}
return
}

 

Labels (4)
6 REPLIES 6
Message 3 of 7
qnologi
in reply to: Anonymous
Message 4 of 7
Kent1Cooper
in reply to: Anonymous


@Anonymous wrote:

.... My mouse has a hard time holding the Middle click, so when working in AutoCad, I remapped the Space Bar to work as the Middle Click button of the mouse....


[Wouldn't it be a lot less work to simply get a new mouse?]

Kent Cooper, AIA
Message 5 of 7
Anonymous
in reply to: qnologi

Sadly, I had already read those forums, non of them give a solution to the problem. 

Message 6 of 7
pendean
in reply to: Anonymous

>>>...My mouse has a hard time holding the Middle click...<<<
"Wouldn't it be a lot less work to simply get a new mouse?"
Message 7 of 7
ThomasPeterson
in reply to: Anonymous

I would also like to know who to disable it. I am 100% sure I never have used space as enter and used space when putting in fractions for measurements.  Now it is very, very, frustrating. 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report