![]() |
Forum Index : Microcontroller and PC projects : File Manager for PicoMite
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
twofingers Guru ![]() Joined: 02/06/2014 Location: GermanyPosts: 1527 |
@Frank, please try the backspace key - BS and than F1. I had the same problem. Regards Michael causality ≠ correlation ≠ coincidence |
||||
Frank N. Furter Guru ![]() Joined: 28/05/2012 Location: GermanyPosts: 936 |
@twofingers: Thank you very much! You're right - Backspace works for me too... Very strange... Frank |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7505 |
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. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4854 |
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 PicomiteVGA PETSCII ROBOTS |
||||
Frank N. Furter Guru ![]() Joined: 28/05/2012 Location: GermanyPosts: 936 |
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 KingdomPosts: 10067 |
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: GermanyPosts: 936 |
It's my Olimex board from this thread: https://www.thebackshed.com/forum/ViewTopic.php?FID=16&TID=17627 I have tried various USB keyboards - always the same behavior. Frank |
||||
Frank N. Furter Guru ![]() Joined: 28/05/2012 Location: GermanyPosts: 936 |
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: NetherlandsPosts: 4854 |
Hi Frank, The ALT key works correct on the PS2 attached keyboard language US. Volhout PicomiteVGA PETSCII ROBOTS |
||||
Frank N. Furter Guru ![]() Joined: 28/05/2012 Location: GermanyPosts: 936 |
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 KingdomPosts: 10067 |
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: GermanyPosts: 936 |
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 KingdomPosts: 10067 |
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: GermanyPosts: 936 |
Thanks Peter! Frank |
||||
javavi![]() Guru ![]() Joined: 01/10/2023 Location: UkrainePosts: 436 |
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: GermanyPosts: 1527 |
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 EndIf Loop End Michael causality ≠ correlation ≠ coincidence |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 3998 |
Just wondering whether k should be printed / why is it set? John |
||||
twofingers Guru ![]() Joined: 02/06/2014 Location: GermanyPosts: 1527 |
Me too, this should be deleted. This is a leftover from the experiments ... ![]() Michael causality ≠ correlation ≠ coincidence |
||||
Amnesie Guru ![]() Joined: 30/06/2020 Location: GermanyPosts: 529 |
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 ![]() Greetings Daniel |
||||
twofingers Guru ![]() Joined: 02/06/2014 Location: GermanyPosts: 1527 |
@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>" 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 Loop End ![]() Kind regards Michael causality ≠ correlation ≠ coincidence |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |