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 KingdomPosts: 2794 |
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 StatesPosts: 229 |
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 KingdomPosts: 278 |
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 KingdomPosts: 2794 |
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: AustraliaPosts: 3165 |
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: GermanyPosts: 1133 |
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 KingdomPosts: 278 |
Twofingers makes a valid point. |
||||
WhiteWizzard Guru Joined: 05/04/2013 Location: United KingdomPosts: 2794 |
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: GermanyPosts: 1133 |
@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 StatesPosts: 229 |
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 KingdomPosts: 2794 |
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 KingdomPosts: 676 |
@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 KingdomPosts: 2794 |
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 KingdomPosts: 676 |
Phil I was and am agreeing with you Peter The only Konstant is Change |
||||
aargee Senior Member Joined: 21/08/2008 Location: AustraliaPosts: 255 |
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 KingdomPosts: 2794 |
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: ThailandPosts: 2209 |
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: GermanyPosts: 1133 |
This problem is rather less important to me. 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 |