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

0 Members and 1 Guest are viewing this topic.

CatDance

  • Mosquito
  • Posts: 5
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.

ronjonp

  • Needs a day job
  • Posts: 7125
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 10 x64 - AutoCAD /C3D 2020

Custom Build PC

wizman

  • Bull Frog
  • Posts: 235
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

  • Mosquito
  • Posts: 5
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:)

CatDance

  • Mosquito
  • Posts: 5
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.

CatDance

  • Mosquito
  • Posts: 5
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.

wizman

  • Bull Frog
  • Posts: 235
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: 17630
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?
\|// Set goal. Experiment tirelessly until
|Oo| practice has become expertise.  Loop.
|- | LinkedIn | Dropbox

tombu

  • Newt
  • Posts: 187
  • 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

  • Swamp Rat
  • Posts: 1446
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 2018     /      Building Design Suite Ultimate 2017     /     AEC Collection 2018 + 2019 +2020