Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 21:57 29 Apr 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : MicroMite Ctrl-C

Author Message
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2794
Posted: 09:16pm 18 Oct 2014
Copy link to clipboard 
Print this post

All,

I urgently need to ask all of you for your help on something easy to test.

I need to know that if you are in the MicroMite editor (and not using MMEdit), and then you press Ctrl-C; does the 'terminal application' clear the screen and display the command prompt? OR does the command prompt display itself 'hidden' in the code listing (i.e. the screen not clear)

I hope this makes sense; and that at least someone is able to try this for me very soon

Unfortunately I am away from the home & office so I can not try the above right now.

But I do seem to remember the screen not clearing and hence being left a little confused by the display.

Anyone trying this - please let me know which version of MMBasic you used!

Many, many thanks in advance . . . .

WW
For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
Lou

Senior Member

Joined: 01/02/2014
Location: United States
Posts: 229
Posted: 09:40pm 18 Oct 2014
Copy link to clipboard 
Print this post

Wiz,

Using an old MX150 28 pin board a CTRL-C anywhere in the middle of an F4 edit gives me a line feed and the command prompt on the next line from wherever the cursor was placed, using Micromite MMBasic Ver 4.5C

You're right the screen does not clear and the command prompt is left in a confusing position but you can tell where it's at because it is blinking.

Lou
Microcontrollers - the other white meat
 
cosmic frog
Senior Member

Joined: 09/02/2012
Location: United Kingdom
Posts: 278
Posted: 01:52am 19 Oct 2014
Copy link to clipboard 
Print this post

On my mx170 it goes back to the command prompt ">_" but the screen looks like it's still in the editor. It seem like it's "forgotten" to clear (cls) the screen.

Dave.
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2794
Posted: 01:57am 19 Oct 2014
Copy link to clipboard 
Print this post

Thanks Lou & Dave for your feedback.

I have raised it with Geoff as I believe it would be a better scenario if the screen was cleared prior to returning to the command prompt.

I hope he will say it is easy to implement - no doubt he will post his comments in good time.

Thanks again . . .


For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3165
Posted: 04:04am 19 Oct 2014
Copy link to clipboard 
Print this post

Ctrl-C is picked up at a very low level and causes an immediate branch to the command prompt. This is by design, the interpreter could be stuck in a low level routine (like waiting for an I2C response) so an immediate action is required.

I guess that the editor could turn off the automatic Ctrl-C response but what if something (?) in the editor or the terminal was stuck in some impossible situation? The user would not have any way of getting out.

I am not sure what the problem is. How serious is hitting Ctrl-C in the editor? Is it worth the trade off of a user being stuck in some impossible situation and not being able to get out?

I could trap Ctrl-C in the editor and do something like send a clear screen escape code but what if the editor itself was disabled?

I hope that I am making sense,
Geoff
Geoff Graham - http://geoffg.net
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1133
Posted: 04:28am 19 Oct 2014
Copy link to clipboard 
Print this post

For the MAXIMITE and me it makes sense!

For me it's a feature, because if I need to see the code AND need to input something at the command prompt I can use the Ctrl-C. Well, at first it was confusing for me, too.

Michael
 
cosmic frog
Senior Member

Joined: 09/02/2012
Location: United Kingdom
Posts: 278
Posted: 04:57am 19 Oct 2014
Copy link to clipboard 
Print this post

Twofingers makes a valid point.
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2794
Posted: 05:45am 19 Oct 2014
Copy link to clipboard 
Print this post

A valid point indeed about seeing the code and then enter something at the command prompt.

This possibly suggests something better: Wherever the cursor was when 'exiting' the editor, it would be good to clear the screen from cursor to bottom of screen, then leave a blank line below the cursor, then display the Command prompt at the start of the next line. (Still following?!?)

This way, it is clear that you are no longer in the editor, and you are not left with lines of code below the command prompt (which is currently causing great confusion here)

Thoughts please . . . .
For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1133
Posted: 06:07am 19 Oct 2014
Copy link to clipboard 
Print this post

@WW

>Thoughts please

just my 2ct:

I think it's always a good idea to keep things simple! Especially Ctrl-C is not a regular exit of the EDIT mode, as Geoff already explained (and you surely knows!).
I would like this behavior untouched. Maybe there could be a Quit command (ESC + y / n / Q) that would work the way you wanted. I'm talking about MAXIMITES.

Regards

Michael
 
Lou

Senior Member

Joined: 01/02/2014
Location: United States
Posts: 229
Posted: 06:12am 19 Oct 2014
Copy link to clipboard 
Print this post

I kind of missed the "CLS" command, perhaps that would help here but is it worth burning a command that could be better used ??

My work-around in a messed up screen display from command prompt is to hit F4 then ESC which effectively clears the screen. My 2c...

Lou
Microcontrollers - the other white meat
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2794
Posted: 07:19am 19 Oct 2014
Copy link to clipboard 
Print this post

Please note - the reason for suggesting a change (why do people naturally hate change?) is that after observing novices use a MicroMite linked to a terminal I could see the look of confusion whenever they pressed Ctrl-C in the editor.

Yes, I know there are 'workarounds' and also know what is the 'best' way to exit the editor, but it needs to be recognised that if novices using the MicroMite are confused in this situation, then surely there is 'room for improvement'.

For anyone out there that has designed solutions for large numbers of users, then if during testing a 'situation' occurs that causes confusion - then it needs to be addressed rather than be 'ignored'.

I am open to other suggestions; for example - why not simply prevent Ctrl C in the editor? The user still has Esc, F1 and F2 to choose from!

So I reiterate - this is not for my benefit - but is for the avoidance of observed confusion by actual users . . . .

Please be critical as I need to arrive at an 'agreed' solution . . . .
For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
G8JCF

Guru

Joined: 15/05/2014
Location: United Kingdom
Posts: 676
Posted: 06:15am 20 Oct 2014
Copy link to clipboard 
Print this post

@WW

Preventing Ctrl+C in the on-board editor is the simplest and cleanest solution IMHO. People shouldn't need to abort the editor, and being able to get out of 'stuck loops' etc using Ctrl+C is really important.

Peter
The only Konstant is Change
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2794
Posted: 06:57am 20 Oct 2014
Copy link to clipboard 
Print this post

  G8JCF said   @WW

Preventing Ctrl+C in the on-board editor is the simplest and cleanest solution IMHO. People shouldn't need to abort the editor, and being able to get out of 'stuck loops' etc using Ctrl+C is really important.

Peter

I am with you on this Peter - and to clarify to anyone else reading the above (just in case it was misinterpreted), I am not looking to 'remove' the Ctrl-C function as it is required in several scenarios (i.e. ending a running program).

WW


For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
G8JCF

Guru

Joined: 15/05/2014
Location: United Kingdom
Posts: 676
Posted: 02:51pm 20 Oct 2014
Copy link to clipboard 
Print this post

Phil

I was and am agreeing with you

Peter
The only Konstant is Change
 
aargee
Senior Member

Joined: 21/08/2008
Location: Australia
Posts: 255
Posted: 04:47pm 20 Oct 2014
Copy link to clipboard 
Print this post

I think Geoff is correct, the Control C should be the one command to rule them all, whether you're in the editor or not.
Knowing that you can hit Ctrl C *anywhere* and get control back is very important and should work anywhere, with no conditions attached.
For crying out loud, all I wanted to do was flash this blasted LED.
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2794
Posted: 06:32pm 20 Oct 2014
Copy link to clipboard 
Print this post

All,

PLEASE read the original post.

I am NOT suggesting to get rid of the Ctrl-C function.

To see what I refer to please carry out the following with a MicroMite connected to TeraTerm (or equivalent:
1> Have a multiline program (20 lines +) in the MicroMite
2> From the Command Prompt type LIST (see a screen full of text i.e. your program)
3> Type EDIT (notice how the screen clears first and then displays your program)
4> Now hit Ctrl-C (to return to Command Prompt)

Now hopefully you see my point - the cursor is 'lost' within your program listing which has remained on the screen.

I am suggesting the command prompt cursor is returned with the screen cleared BELOW the cursor so that it is 'obvious' that you are at the command promt.

PLEASE - no more suggestions as to how to clear the screen from this scenario. Put yourself in the shoes of a new user. Would a command prompt embedded within a program listing confuse you?

I know Geoff is on the case - but would appreciate people's feedback as to the solution I suggest above i.e. clear the screen below the cursor when returned to the command prompt using Ctrl-C


For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 09:40pm 20 Oct 2014
Copy link to clipboard 
Print this post

I would like a key combination to be the last resort before a reset is necessary.
So even in the editor it should kill the editor and return to the prompt.

It is almost like a CTRL+ALT+DELETE on PC's.

HOWEVER!!!
CTRL+C is a key combination that is used a lot in editors, as such it is not the best combination to fulfill that role. In an editor it should be the COPY function or do nothing.

Maybe it can be changed to a CTRL+ALT+C combination?

Microblocks. Build with logic.
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1133
Posted: 11:48pm 21 Oct 2014
Copy link to clipboard 
Print this post

This problem is rather less important to me.
  Quote  CTRL+C is a key combination that is used a lot in editors, as such it is not the best combination to fulfill that role. In an editor it should be the COPY function or do nothing.

the good old Wordstar commands. (... then came WYSIWYG, WIN3.0, WWW, then viruses and trojans ...)

On the other hand has CTRL+C for Basic a similar history - like COPY in editors - , I think. Do you realise that you can easy disable the CTRL-C (p 42 Micromite manual - OPTION BREAK nn)? For Maximite this also works for the editor, if someone really thinks they have to have this.

If I could make a wish, then I would change the F4/F5 to Shift-Arrow, Ctrl-Ins and Shift-Ins. But that wish is for xmas (not to discuss here)... and my wishlist grows every day.

Michael
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024