Author Topic: noob question ... Ctrl-c for cancel  (Read 3319 times)

0 Members and 1 Guest are viewing this topic.

CatDance

  • Newt
  • Posts: 57
noob question ... Ctrl-c for cancel
« on: May 05, 2020, 04:20:54 AM »
How to make Ctrl-c = cancel command ?

I try to replace Ctrl-c = "Copyclip" to c^c^ (in the CUI) but it only do a soft cancel ie. when selected gripmodes on screen, it won't do a hard cancel by removing selected gripmode. Only pressing Esc key do a hard cancel.

I am used to pressing Ctrl-c as my fingers are nearer to Ctrl key.

Thanks.
A must-read book: Amazing story how Bill + Paul started Microsoft and history of computer revolution.
https://www.amazon.com/Hard-Drive-Making-Microsoft-Empire/dp/0887306292

Brief history of Microsoft
https://www.youtube.com/watch?v=BLaMbaVT22E

ronjonp

  • Needs a day job
  • Posts: 7526
Re: noob question ... Ctrl-c for cancel
« Reply #1 on: May 05, 2020, 09:46:33 AM »
How about something like this:
Code - Auto/Visual Lisp: [Select]
  1.  (defun c:zz nil (command) (princ))

IMO redefining OOTB commands is bad practice.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

wizman

  • Bull Frog
  • Posts: 290
Re: noob question ... Ctrl-c for cancel
« Reply #2 on: May 05, 2020, 11:02:10 AM »
If Copyclip is set to C^C^, then QAFLAGS must be set to 1 to drop the grips.

CatDance

  • Newt
  • Posts: 57
Re: noob question ... Ctrl-c for cancel
« Reply #3 on: May 10, 2020, 03:38:33 AM »
How about something like this:
Code - Auto/Visual Lisp: [Select]
  1.  (defun c:zz nil (command) (princ))

IMO redefining OOTB commands is bad practice.

Ok, Ron.... I will not redefine the "OOTB" commands (what is a OOTB ??  :embarrassed:)
A must-read book: Amazing story how Bill + Paul started Microsoft and history of computer revolution.
https://www.amazon.com/Hard-Drive-Making-Microsoft-Empire/dp/0887306292

Brief history of Microsoft
https://www.youtube.com/watch?v=BLaMbaVT22E

CatDance

  • Newt
  • Posts: 57
Re: noob question ... Ctrl-c for cancel
« Reply #4 on: May 10, 2020, 03:40:24 AM »
If Copyclip is set to C^C^, then QAFLAGS must be set to 1 to drop the grips.

Ok wiz I will try this.
A must-read book: Amazing story how Bill + Paul started Microsoft and history of computer revolution.
https://www.amazon.com/Hard-Drive-Making-Microsoft-Empire/dp/0887306292

Brief history of Microsoft
https://www.youtube.com/watch?v=BLaMbaVT22E

CatDance

  • Newt
  • Posts: 57
Re: noob question ... Ctrl-c for cancel
« Reply #5 on: May 10, 2020, 03:46:46 AM »
If Copyclip is set to C^C^, then QAFLAGS must be set to 1 to drop the grips.

Thanks, Wiz. It worked.
A must-read book: Amazing story how Bill + Paul started Microsoft and history of computer revolution.
https://www.amazon.com/Hard-Drive-Making-Microsoft-Empire/dp/0887306292

Brief history of Microsoft
https://www.youtube.com/watch?v=BLaMbaVT22E

wizman

  • Bull Frog
  • Posts: 290
Re: noob question ... Ctrl-c for cancel
« Reply #6 on: May 10, 2020, 03:55:09 AM »
CatDance, please have also a research of what the qaflags do to other commands and as Ronjonp advised, consider to leave the default commands untouched.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: noob question ... Ctrl-c for cancel
« Reply #7 on: May 10, 2020, 12:09:01 PM »
(what is a OOTB ??  :embarrassed:)

Out Of The Box?
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

tombu

  • Bull Frog
  • Posts: 288
  • ByLayer=>Not0
Re: noob question ... Ctrl-c for cancel
« Reply #8 on: May 11, 2020, 12:06:50 AM »
While I wouldn't advise ever modifying the acadXXXXdoc.lsp version specific lisp file that comes with each version most of the functions defined there have been around for many years. and are always available. I've used ai_onoff for toggling system variables in CUI macros. It was used in installed MNU files a quarter century ago.
Code: [Select]
;;; Shortcut menu Deselect All item.

(defun ai_deselect ()
   (if (= (getvar "cmdecho") 0) ;start if
       (command "_.select" "_r" "_all" "")
       (progn ;start progn for cmdecho 1
           (setvar "cmdecho" 0)
           (command "_.select" "_r" "_all" "")
           (setvar "cmdecho" 1)
       ) ;end progn for cmdecho 1
   ) ;end if
   (terpri)
   (prompt "Everything has been deselected")
   (princ)
)

;;; Command version of ai_deselect to be called from the CUI
;;; so it gets properly recorded by the Action Recorder
;;;
(defun c:ai_deselect ()
  (ai_deselect)
  (princ)
)
ai_deselect works no matter the situation in AutoCAD products.
Tom Beauford P.S.M.
Leon County FL Public Works - Windows 7 64 bit AutoCAD Civil 3D

Crank

  • Water Moccasin
  • Posts: 1503
Re: noob question ... Ctrl-c for cancel
« Reply #9 on: May 14, 2020, 08:09:06 AM »
How to make Ctrl-c = cancel command ?

I try to replace Ctrl-c = "Copyclip" to c^c^ (in the CUI) […]

That's one CANCEL: Try ^c^c
Vault Professional 2023     +     AEC Collection