Posted: 10:35am 16 Jan 2025 Copy link to clipboard
twofingers Guru
@Frank, please try the backspace key - BS and than F1. I had the same problem. Regards Michael
Posted: 10:44am 16 Jan 2025 Copy link to clipboard
Frank N. Furter Guru
@twofingers:
Thank you very much! You're right - Backspace works for me too... Very strange...
Frank
Posted: 10:56am 16 Jan 2025 Copy link to clipboard
Mixtel90 Guru
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.
Posted: 11:09am 16 Jan 2025 Copy link to clipboard
Volhout Guru
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
Posted: 11:14am 16 Jan 2025 Copy link to clipboard
Frank N. Furter Guru
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
Posted: 11:22am 16 Jan 2025 Copy link to clipboard
matherp Guru
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
Posted: 11:26am 16 Jan 2025 Copy link to clipboard
Frank N. Furter Guru
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
Posted: 10:22am 17 Jan 2025 Copy link to clipboard
Frank N. Furter Guru
I wasn't sure whether I was simply using the program incorrectly...
Does the ALT key work for anyone???
Frank
Posted: 11:49am 17 Jan 2025 Copy link to clipboard
Volhout Guru
Hi Frank,
The ALT key works correct on the PS2 attached keyboard language US.
Volhout
Posted: 12:16pm 17 Jan 2025 Copy link to clipboard
Frank N. Furter Guru
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
Posted: 12:41pm 17 Jan 2025 Copy link to clipboard
matherp Guru
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
Posted: 01:06pm 17 Jan 2025 Copy link to clipboard
Frank N. Furter Guru
Excuse me if I ask: If I understand you correctly, do I have to change/adapt it in the file manager program?
Frank
Posted: 01:12pm 17 Jan 2025 Copy link to clipboard
matherp Guru
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")
Posted: 01:40pm 17 Jan 2025 Copy link to clipboard
Frank N. Furter Guru
Thanks Peter!
Frank
Posted: 03:02pm 17 Jan 2025 Copy link to clipboard
javavi Guru
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.
Posted: 03:23pm 17 Jan 2025 Copy link to clipboard
twofingers Guru
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
Posted: 05:18pm 17 Jan 2025 Copy link to clipboard
JohnS Guru
Just wondering whether k should be printed / why is it set?
John
Posted: 07:00pm 17 Jan 2025 Copy link to clipboard
twofingers Guru
Me too, this should be deleted. This is a leftover from the experiments ... Michael
Posted: 12:30pm 24 Jan 2025 Copy link to clipboard
Amnesie Guru
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
Posted: 04:01pm 24 Jan 2025 Copy link to clipboard
twofingers Guru
@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
Page 8 of 17
The Back Shed's forum code is written, and hosted, in Australia.