Page 1 of 1

discard a space as the first character in command input

Posted: Fri Nov 19, 2021 3:37 pm
by RobB
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

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

Posted: Fri Nov 19, 2021 4:19 pm
by CVH
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

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

Posted: Sat Nov 20, 2021 8:39 am
by RobB
With <command> here I mean any of the two letter QCAD commands, like "mv" (my favorite).

Regards,
Rob

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

Posted: Sat Nov 20, 2021 9:11 am
by CVH
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

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

Posted: Sat Nov 20, 2021 9:38 am
by Husky
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:

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

Posted: Sat Nov 20, 2021 10:58 am
by CVH
@ 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

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

Posted: Sat Nov 20, 2021 1:10 pm
by RobB
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