discard a space as the first character in command input

Please use this forum to post feedback and suggestions related to QCAD.

Moderator: andrew

Post Reply
RobB
Full Member
Posts: 65
Joined: Sun May 26, 2019 4:02 pm
Location: Alpnach, Switzerland

discard a space as the first character in command input

Post by RobB » Fri Nov 19, 2021 3:37 pm

I frequently type <space> <command> to get back to command input without looking to the command box. Sometimes I am already at the command line, and I get an error like:
Unknown command or invalid coordinate or value: " mv"

AFAIK a space as first command character has no meaning, and could be discarded to avoid above error.
There might be another way to avoid the error, like always go to the command line when typing unless an applet requires input, but I don't know enough of Qcad to know if that is possible.

Rob
Linux Mint 20 , qcadcam-3.24.3.10-pro-linux-x86_64

CVH
Premier Member
Posts: 1608
Joined: Wed Sep 27, 2017 4:17 pm

Re: discard a space as the first character in command input

Post by CVH » Fri Nov 19, 2021 4:19 pm

RobB wrote:
Fri Nov 19, 2021 3:37 pm
AFAIK a space as first command character has no meaning
Nice catch, as Feature Request I'll vote for it, but where do you need the <command> aka Apple clover key for?

Looking here it should be or <Space> or <Ctrl+M> or <Clover+M> ... :wink:
https://www.ribbonsoft.com/archives/sho ... uts_en.pdf

Regards,
CVH

RobB
Full Member
Posts: 65
Joined: Sun May 26, 2019 4:02 pm
Location: Alpnach, Switzerland

Re: discard a space as the first character in command input

Post by RobB » Sat Nov 20, 2021 8:39 am

With <command> here I mean any of the two letter QCAD commands, like "mv" (my favorite).

Regards,
Rob
Linux Mint 20 , qcadcam-3.24.3.10-pro-linux-x86_64

CVH
Premier Member
Posts: 1608
Joined: Wed Sep 27, 2017 4:17 pm

Re: discard a space as the first character in command input

Post by CVH » Sat Nov 20, 2021 9:11 am

RobB wrote:
Sat Nov 20, 2021 8:39 am
With <command> here I mean any of the two letter QCAD commands, like "mv" (my favorite).
Rob,
That was my misconception there one uses the command line mostly for entering values ... coordinates.

You don't need to be in/on the command line to invoke methods by their shortcuts.
With the focus on the drawing you can simply type "mv" or any other shortcut.

Regards,
CVH

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 3887
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: discard a space as the first character in command input

Post by Husky » Sat Nov 20, 2021 9:38 am

RobB wrote:
Fri Nov 19, 2021 3:37 pm
AFAIK a space as first command character has no meaning, and could be discarded to avoid above error.
Well, a computer program code is very picky - space is as important as ANY visible character. Unfortunately humans are misled by the fact because we can't see it ...
RobB wrote:
Fri Nov 19, 2021 3:37 pm
I frequently type <space> <command> to get back to command input without looking to the command box. Sometimes I am already at the command line, and I get an error like:
Unknown command or invalid coordinate or value: " mv"
A change in your habit could avoid this error. Instead of using "Space" you could use the "ESC" key on your Keyboard. With that key used it doesn't matters where your cursor is actual located - ESC will focus on Model_Space and mv (etc.) works like a charm without any error message.

This said - I would not vote in favor to that Feature request .... :wink:
Work smart, not hard: QCad Pro

If a thread is considered as "solved" please change the title of the first post to "[solved] Title...". Thanks!

CVH
Premier Member
Posts: 1608
Joined: Wed Sep 27, 2017 4:17 pm

Re: discard a space as the first character in command input

Post by CVH » Sat Nov 20, 2021 10:58 am

@ Husky.
There are pros and cons, but I really don't see the advantage of leading spaces on the command line.

Is there anything that you know of what requires a leading space?
Presume that I hit the space key and my keyboard send two spaces for any reason at all ... :roll:

Usually I need coordinates in full floating point notation e.g. '366,37011518771986;57,94002946014383'
Then it is of no issue when I copy over some extra spaces from textual data. 8)
Then it is not picky at all.

When things get really complicated, like with a series of commands to draw something, I put my full trust in DrawFromCSV.
There spaces nor tabs nor decimal or list separators are an issue.

Regards,
CVH

RobB
Full Member
Posts: 65
Joined: Sun May 26, 2019 4:02 pm
Location: Alpnach, Switzerland

Re: discard a space as the first character in command input

Post by RobB » Sat Nov 20, 2021 1:10 pm

A change in your habit could avoid this error. Instead of using "Space" you could use the "ESC" key on your Keyboard. With that key used it doesn't matters where your cursor is actual located - ESC will focus on Model_Space and mv (etc.) works like a charm without any error message.]
Interesting, I did not even realize that. If I am in a drawing; I always went to the command input for a command. Probably because I follow up with setting a refpoint and when I use @x,y for a target location, get stuck since I am not in the command box. Maybe typing a valid location should become automatically command line input, but I have no idea if that compromises something else. Clearly I need to look at how I am doing things.

Thanks for the helpful comments.
Rob
Linux Mint 20 , qcadcam-3.24.3.10-pro-linux-x86_64

Post Reply

Return to “QCAD Suggestions and Feedback”