File Manager for PicoMite


Author Message
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1732
Posted: 10:35am 16 Jan 2025      

  Frank N. Furter said  UPDATE:
=======
ALT+F1  does not work for me. It makes no difference to me whether I hold down the ALT key while pressing the function keys or not. (I have tried two keyboards...)

@Frank,
please try the backspace key - BS and than F1. I had the same problem.
Regards
Michael

Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 1072
Posted: 10:44am 16 Jan 2025      

@twofingers:

Thank you very much! You're right - Backspace works for me too...
Very strange...

Frank

Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 8754
Posted: 10:56am 16 Jan 2025      

This could still be a keyboard issue. There are no ASCII codes associated with either ALT or the function keys so exactly how they are decoded is not guaranteed for every keyboard. Many keys generate multiple codes when they are pressed and it could be that the code generated by F1 is missing at least part of the code that is being generated by BS.

Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5844
Posted: 11:09am 16 Jan 2025      

Maybe DE keyboard mapping ?
Both Frank and Michael use German Keyboards I guess.
Both could try a US keyboard if they have one, and confirm it works with ALT.

Volhout

Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 1072
Posted: 11:14am 16 Jan 2025      

  Volhout said  Can you perhaps also compile a version WITHOUT HDMI sound - with HDMI sound some of my monitors don't work and only show a black picture...

I just tried it with a US keyboard - it's the same behavior! ALT doesn't work, backspace works...

Frank

UPDATE:
When I switch with OPTION KEYBOAD US, it still doesn't work!
Edited 2025-01-16 21:17 by Frank N. Furter

matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 11168
Posted: 11:22am 16 Jan 2025      

If you are reporting keyboard issues in the firmware or any application software it is essential to specify whether you are referring to a

USB connected keyboard
PS2 connected keyboard
Computer Console connected keyboard, in which case you also need to specify which OS and which console program

All of these may give different results, particularly in respect of modifier keys and even more particularly with different language variants where modifier keys are used differently

Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 1072
Posted: 11:26am 16 Jan 2025      

It's my Olimex board from this thread: https://www.thebackshed.com/forum/ViewTopic.php?FID=16&TID=17627

  Quote  I have flashed a "Olimex RP2040‐PICO‐PC" (with Pico-2) with the "PicoMiteHDMIUSBV6.00.01.uf2" (2024-12-30_183756_PicoMiteRP2350V6.00.01.zip) version.

I have tried various USB keyboards - always the same behavior.

Frank

Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 1072
Posted: 10:22am 17 Jan 2025      

  matherp said  If you are reporting keyboard issues in the firmware or any application software it is essential to specify whether you are referring to a

USB connected keyboard
PS2 connected keyboard
Computer Console connected keyboard, in which case you also need to specify which OS and which console program

All of these may give different results, particularly in respect of modifier keys and even more particularly with different language variants where modifier keys are used differently

I wasn't sure whether I was simply using the program incorrectly...

Does the ALT key work for anyone???

Frank

Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5844
Posted: 11:49am 17 Jan 2025      

Hi Frank,

The ALT key works correct on the PS2 attached keyboard language US.

Volhout

Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 1072
Posted: 12:16pm 17 Jan 2025      

Hmm, then there seems to be a bug somewhere. It doesn't work for me with OPTION KEYBOARD US and my USB keyboards either...

Frank

matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 11168
Posted: 12:41pm 17 Jan 2025      

The scancodes for PS2 and USB are completely different. The ALT key on PS2 seems to send &H8B whereas on USB the ALT key is a modifier that can be interrogated with the KEYDOWN function. For a USB keyboard to work there will need to be a change to the application. For a computer connected keyboard, AFAIK, it won't and can't ever work
Edited 2025-01-17 23:04 by matherp

Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 1072
Posted: 01:06pm 17 Jan 2025      

Excuse me if I ask:
If I understand you correctly, do I have to change/adapt it in the file manager program?

Frank

matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 11168
Posted: 01:12pm 17 Jan 2025      

Yes

I haven't looked at the program but wherever it looks for ALT then you will need to replace that with a call to "KEYDOWN(7) & 1" (manual page 167)

The program should be generalized to work with either by using instr(MM.DEVICE$,"USB")

Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 1072
Posted: 01:40pm 17 Jan 2025      

Thanks Peter!

Frank

javavi

Guru

Joined: 01/10/2023
Location: Ukraine
Posts: 544
Posted: 03:02pm 17 Jan 2025      

  Frank N. Furter said  Hmm, then there seems to be a bug somewhere. It doesn't work for me with OPTION KEYBOARD US and my USB keyboards either...

Can you check your keyboards with a simple program?
Do
 K=ASC(Inkey$)
 If K Then Print K;
Loop

Alt = 139

I will try to fix the FM program for using USB keyboards in the near future.

twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1732
Posted: 03:23pm 17 Jan 2025      

As Peter wrote, keycode could sometimes help.
However, there are differences between USB and USB+Console.
Dim key$
CLS
Print "press a key to check! EXIT with CTRL + <C>"
Do
 Do :Key$=Inkey$:Loop While Key$=""
 k=KeyDown(1)
 Print "Keycode: "Asc(key$),
 If key$>=" " Then
   Print "ASCII: ";key$,"Keydown(7): "KeyDown(7)
 Else
   Print
 EndIf
Loop
End

Michael

JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4298
Posted: 05:18pm 17 Jan 2025      

  twofingers said  As Peter wrote, keycode could sometimes help.
However, there are differences between USB and USB+Console.
Dim key$
CLS
Print "press a key to check! EXIT with CTRL + <C>"
Do
 Do :Key$=Inkey$:Loop While Key$=""
 k=KeyDown(1)
 Print "Keycode: "Asc(key$),
 If key$>=" " Then
   Print "ASCII: ";key$,"Keydown(7): "KeyDown(7)
 Else
   Print
 EndIf
Loop
End

Michael

Just wondering whether k should be printed / why is it set?

John

twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1732
Posted: 07:00pm 17 Jan 2025      

  JohnS said  ...
Just wondering whether k should be printed / why is it set?

John

Me too, this should be deleted. This is a leftover from the experiments ...  
Michael

Amnesie
Guru

Joined: 30/06/2020
Location: Germany
Posts: 748
Posted: 12:30pm 24 Jan 2025      

Hello,

quick question: Is there a mouse support (ps2/usb) for the file manager yet? I think this would be an improvement if not already built in   Drag 'n Drop from one DIR to another or copy etc...

Greetings
Daniel

twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1732
Posted: 04:01pm 24 Jan 2025      

@John
I think this is a better attempt to show the different return values ​​for different keyboards.
'* Keydown-view to show all keydown codes
'* From manual:
'* KEYDOWN(0)    = number of keys being pressed
'* KEYDOWN(1)-(6)= decimal ASCII value of the USB keyboard key
'* KEYDOWN(7)    = will give any modifier keys that are pressed
'* lalt = 1, lctrl = 2, lgui = 4, lshift = 8,
'* ralt = 16,rctrl = 32, rgui = 64, rshift = 128,
'* Last column: KEYDOWN(8)=status of the lock keys
'* caps_lock = 1, num_lock = 2, scroll_lock = 4
'**************************************************
MODE 1
CLS
Dim key$
Dim integer i,pp,FW=MM.Info(fontwidth)
CLS
Print "Keydown view. Press a key to check! EXIT with CTRL + <C>"
Print
Do
Do :Key$=Inkey$:Loop While Key$=""
If key$<" " Then key$=""
pp=9
Print "ASCII: ";key$;@(pp*FW);
For i= 0 To 7
  Inc pp,9-(i<1)*2
  Color RGB(white),255<<7 Or 255 * Not(i Mod 2)
  Print "K(";Str$(i,1);")";
  Select Case i
    Case 0
      Print KeyDown(i);" ";
    Case <7
      Print Str$(KeyDown(i),4);" ";
    Case 7
      Print Str$(KeyDown(i),4);
      Color RGB(white),0
      Print KeyDown(8);
  End Select
  Print @(pp*fw);
Next
Print
Loop
End




Kind regards
Michael