![]() |
Forum Index : Microcontroller and PC projects : Mark, Copy, Paste in editor 5.07.05
Author | Message | ||||
Hans![]() Senior Member ![]() Joined: 18/10/2022 Location: CanadaPosts: 116 |
Hi All; I installed the 5.07.05 stable uf2 file on my raspberry pi pico and I seem to have an issue when I use the F4 Mark then then with the arrow mark the text. I then use F5 Copy. The high lite area turns normal and the editor shows the standard menu items at the bottom. I move move the cursor to the new position and press F5 Paste, but then throws me out of the editor and displays "> T". What gets me is something has changed in the behavior as days ago when pressing F5 to Paste a message at the bottom of the editor something like "Do you wish to cancel or discard changes Y/N > T" but I don't seem to be able to make that happen again! N cancels whatever that was and returns me to normal editing. Really baffled on how to use this feature and why it changed. I am using Putty on a Raspberry Pi 4 8Gb, and everything has been working. My command line OPTIONS are; option system i2c gp16,gp17 option colourcode on option lcdpanel ssd1306i2c, landscape option sdcard gp13, gp10, gp11, gp12 option rtc auto enable The sd card works great for storing programs. My Flash storage is empty. The RTC is working as expected. The SSD1306 is attached to the same I2C buss as the RTC, and it works correctly. Tried power cycling to get the original error back but it did nothing. Any help or suggestions would be greatly appreciated! Hans ... ![]() |
||||
Hans![]() Senior Member ![]() Joined: 18/10/2022 Location: CanadaPosts: 116 |
PS: I tried new at the command line, typed some stuff and went through the F4,F5,F5 sequence and got the editor to correctly show the original problem. At the bottom of the editor it says "Exit and discard all (Y/N): T". "Y" kicks you out of the editor removing ANY changes made before saving. "N" resumes normal editing and shows nothing got pasted. There you have it. ![]() TIA, Hans ... Edited 2022-10-21 11:32 by Hans |
||||
led-bloon![]() Senior Member ![]() Joined: 21/12/2014 Location: AustraliaPosts: 207 |
I use minicom on my RaspberryPi and have the same problem(s). F1,F2,F3,F4 work as expected, but, F5 does not. I use <CTL>y for F5 functionality. <SHIFT>F3 does not work either. Pages 15/16 of the manual gives the alternatives to the function keys. led Edited 2022-10-21 11:36 by led-bloon Miss you George |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4044 |
I expect the keystrokes are being taken by such as the GUI. You can change that but is it worth it? John |
||||
Hans![]() Senior Member ![]() Joined: 18/10/2022 Location: CanadaPosts: 116 |
Thanks, I saw those but never tried them. I will let you know how I make out. Thanks, Hans ... ![]() |
||||
Hans![]() Senior Member ![]() Joined: 18/10/2022 Location: CanadaPosts: 116 |
Hi John; I'm just using the terminal editor so I'm not certain what you are saying in your comment about GUI. The SSD1306 I mentioned is only 128x64 and thus totally impractical for anything except a status display. Please help me understand where you train of thought is heading. Thank you for your comment, Hans ... ![]() |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4044 |
When you use a key (or combination of keys) some code(s) is/are generated and they flow through the OS then possibly some more things (such as GUI / window system) and then the terminal emulator. They won't reach the terminal emulator if they're swallowed (used up) by one of the other things. John |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7937 |
The built-in editor isn't officially supported with anything other than Tera Term, Hans. Do you have the capability to test with windows/Tera Term? The mysterious "T" shouldn't be there. Something is sending it but I don't know what. AFAIK that version of the firmware doesn't have an editor problem. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2442 |
not quite - GFXterm has been built to work with the micromite editor and is available for linux, windows, and RPi. try running the following program on your pico: Do I=Timer Do a$=Inkey$ Loop Until a$<>"" If Timer-I>100 Then Print If a$=Chr$(13) Then Print "<cr>"; ElseIf a$=Chr$(10) Then Print "<lf>"; ElseIf a$=Chr$(27) Then Print "<esc>"; ElseIf a$<Chr$(32) Then Print "<";Hex$(Asc(a$),2);">"; Else Print a$; EndIf Loop (from: https://www.thebackshed.com/forum/ViewTopic.php?TID=12138&P=1#146653 ) press each of the problematic keys and the above program will print out what escape sequences are being sent by PuTTY. report back the results. cheers, rob :-) Edited 2022-10-22 11:31 by robert.rozee |
||||
Hans![]() Senior Member ![]() Joined: 18/10/2022 Location: CanadaPosts: 116 |
Again thanks for all your comments. OK,I can't let a problem go without knowing as much as I can. That being said I wrote my own program to capture key presses. My program is similar but it shows the decimal and ASCII characters. Every F key 5 and up to F12 shows the program receiving 3 values with the one key press. The screen shot below was from F1, F2, F3, F4, F5, and behold the mysterious "T" shows up as the last character of 3 from F5. I didn't think KBs did that on F keys. So Whats happening? I will be trying some other languages to see if this behavior continues. I will try your program as well to see if the results are any different but F5 and beyond all throw an ESC key as the 1st piece of data, which explains the discard message, and the "T" in the input area. ![]() This capture shows the message after F5 is pressed. ![]() BTW the Ctrl-Y works for a paste as was suggested, just a pain to use. This is the suggested program capture, F1 to F5. ![]() If I find anything else I will post again. Thanks again guys, Hans ... ![]() |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
Terminals send an escape string for the function keys The pico internally translates them into the high values you are seeing Example For F3 a terminal will send <esc>[13~ and mmbasic will report it as chr$(147) The bad news is, there are lots of 'standards' XTERM and VT100 etc and what sequence they send varies, especially the shifted function keys. Some of the function keys are also reserved for the terminal program and will not get sent. Your terminal setting are sending a sequence that is not recognized by MMBasic. If the RPi version of Putty allows it, you could try a different function key encoding. Rob's GFXterm or my MMEdit should both work correctly on the RPi. Jim VK7JH MMedit |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2442 |
The pico internally translates them into the high values you are seeing i can confirm this (5.07.04, non-VGA version), i've not seen it (the pico) do this before, and as far as i am aware no other mmbasic variants behave like this; i am pretty sure this is quite a new thing for the pico. so for certain escape sequences, these sequences are translated into a single high-bit-set character. for instance the X11 escape sequences for f1 to f13 are translated, but those for f14 to f20 are not. it looks like this translation is carried out directly on the console port, ie NOT by the editor itself, so the console can no longer be reliably used by an mmbasic program for arbitrary data input that may contain escape characters. anything requiring this will need to switch to using COM1 or COM2. geoff: this should be noted in the manual. btw, i also see that the pico's editor is now sending out window resize commands: <ESC>[8;24;81t GFXterm ignores these, but other terminal emulators may be completely messed up by this. i have no idea why one would want to set the terminal to 81 columns! there seems to be some discussions about these sort of sequences on microsoft's own forums; such sequences are ignored by the 'windows console terminal' - trying to support them opens a can of worms. cheers, rob :-) |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10315 |
minicom does something strange with F5 - see here |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4044 |
Maybe minicom can be made to do whatever you want using such as TERM=... minicom (or -t or --term on the command line) and an appropriate termcap. (Or, minicom's configuration file, perhaps.) In a windowing environment (X etc), xmodmap might be another way. John Edited 2022-10-22 23:17 by JohnS |
||||
Hans![]() Senior Member ![]() Joined: 18/10/2022 Location: CanadaPosts: 116 |
Hi again all; You guys have been more than helpful. Robert talked about GFXterm so I looked at the putty settings and there is a Function Keys and Pad setting option to Xterm R6 so I changed it to that from VT100+. The F5 works properly as far as the quick test that I tried. ![]() I should have remembered that the terminal you emulate makes the behavior different. Again thanks for all the great advice. This forum rocks. ![]() Much happier hobbyist, Hans ... ![]() PS: Added note, I tried my keyboard test and all keys return values as expected now. Hans ... ![]() Edited 2022-10-23 02:07 by Hans |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |