fbergama / pigfx

PiGFX is a bare metal kernel for the Raspberry Pi that implements a basic ANSI terminal emulator with the additional support of some primitive graphics functions.
MIT License
278 stars 62 forks source link

autorepeat dosen't function as expected. #36

Closed lindoran closed 4 years ago

lindoran commented 4 years ago

when you hold down a key, there should be a slightly longer delay followed by a series of repeated key presses. an example would be if you open a dos window in windows or an xterm when you hold down the L key it should wait a few milliseconds and then start rapidly repeating that key press. The same should happen with the backspace key. this functionality works like this on the pi terminal in Linux but not under pigfx. The same is true for another serial terminal emulator i tested (the grant serle video and keyboard interface). I do not have a way of testing with PS2, and am only experiencing this with the USB keyboard. this would be on the PiZero 1.3 If you try to toggle the backspace key echo in the config file it does echo the backspace 1 time, and then it does not anymore(it sends 2 of the currently configured control codes for backspace). If you connect to the host computer with a terminal emulator running on a PC and a TTL to USB adapter it works as expected. This issue happens under CPM ,BASIC and forth interpreters on tests were performed on a Z80MBC2 SBC, and putty configured for 115200, with control-H for backspace, on a windows terminal emulator for the same computer (the Z80MBC2).

chregu82 commented 4 years ago

I'm really not sure if I understood your issue. I assume you have a USB keyboard connected to the Pi Zero and the Pi Zero connected to your Z80MBC2. If you hold down a key on this keyboard, it does not repeat this key? Which version of PiGFX are you using?

lindoran commented 4 years ago

I am using the newest version with sprite collision, I haven't noticed because I'd been using a notepad app on windows to edit source so I couldn't say if it was always an issue or not.

On Tue, Sep 1, 2020, 1:05 AM Christian Lehner notifications@github.com wrote:

I'm really not sure, I understood your issue. I assume you have a USB keyboard connected to the Pi Zero and the Pi Zero connected to your Z80MBC2. If you hold down a key on this keyboard, it does not repeat this key? Which version of PiGFX are you using?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fbergama/pigfx/issues/36#issuecomment-684404048, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQIK5ZCTNSYLQQ4FIVYYNOTSDSFKTANCNFSM4QRI4YHQ .

chregu82 commented 4 years ago

I'm quite confused about this issue. I tested V1.7.5 on a Pi Zero 1.3 connected to a windows machine with an USB to serial adapter. I ran putty there. If i press a key on the keyboard for longer than about halb a second, i get repeated characters on the terminal on the windows machine. Maybe I didn't understand what you were trying to do. The config.txt option backspaceEcho does a backspace on the Pi display AND sends the backspace to the serial output if backspace is pressed on the Pi keyboard.

lindoran commented 4 years ago

Only thing I can think then is, it's something with the computer and the way it's handles input from the terminal. Are you using the keyboard that is plugged to a otg adapter on the PiGFX terminal or the keyboard on the PC that is running putty? Another way to look at this is... When I test it using only putty as a terminal it works fine on the Z80-mbc2 but when I use the PiGFX interface and a keyboard hooked through an OTG adapter and a HDMI monitor it dose not. That's especially troubling to troubleshoot because putty works but PiGFX doesn't. I'll try more tests tonight. Is there some way PiGFX differs from putty as a terminal emulator? On Tue, Sep 1, 2020, 10:57 AM Christian Lehner notifications@github.com wrote:

I'm quite confused about this issue. I tested V1.7.5 on a Pi Zero 1.3 connected to a windows machine with an USB to serial adapter. I ran putty there. If i press a key on the keyboard for longer than about halb a second, i get repeated characters on the terminal on the windows machine. Maybe I didn't understand what you were trying to do. The config.txt option backspaceEcho does a backspace on the Pi display AND sends the backspace to the serial output if backspace is pressed on the Pi keyboard.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fbergama/pigfx/issues/36#issuecomment-684958759, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQIK5ZGN3ASIPGBOALGMJW3SDUKXFANCNFSM4QRI4YHQ .

chregu82 commented 4 years ago

I'm still not quite sure, if I understand your problem and your setup. Is it possible to do a short video showing your setup and showing what doesn't work? You write that it work if you connect putty to your Z80, but it does not work on PiGFX as the terminal. Do you refer to key repeat or backspace echo?

lindoran commented 4 years ago

I'll absolutely do a short video. 😁 It's going to be later today work till late afternoon. I'll get back to you as soon as I can.

On Tue, Sep 1, 2020, 12:08 PM Christian Lehner notifications@github.com wrote:

I'm still not quite sure, if I understand your problem and your setup. Is it possible to do a short video showing your setup and showing what doesn't work? You write that it work if you connect putty to your Z80, but it does not work on PiGFX as the terminal. Do you refer to key repeat or backspace echo?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fbergama/pigfx/issues/36#issuecomment-685005879, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQIK5ZE4T6HLMNF4HRAA4HTSDUS73ANCNFSM4QRI4YHQ .

chregu82 commented 4 years ago

That's fine, I'll probably be sleeping by then. 😁

lindoran commented 4 years ago

here's the video, first is the z80 computer hooked to the PiGFX terminal using the USB keyboard. 2nd part of the video is the same z80 computer hooked to putty through a usb to ttl link, using the same 4 wire connection as with the PiGFX terminal. I believe this shows that the issue is not the z80 computer.

https://drive.google.com/file/d/1cM4YVeGRTsEM1PzfLB8cdHiLbLgkYs4e/view?usp=sharing

On Tue, Sep 1, 2020 at 12:19 PM Christian Lehner notifications@github.com wrote:

That's fine, I'll probably be sleeping by then. 😁

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fbergama/pigfx/issues/36#issuecomment-685012293, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQIK5ZHRQV4T2NKZPJOHRHLSDUULNANCNFSM4QRI4YHQ .

-- if only there was an endless river of information, connecting the world's computer systems; simply cataloging and indexing useful information.... sigh oh well.

chregu82 commented 4 years ago

Thanks for the video. This feature works in my setup. Please try a different USB keyboard if possible, I think it probably acts different than mine. You could also try connecting your windows pc to the Pi zero. Typing on the keyboard would then be seen in putty on the Windows machine. Please only try this if your USB to TTL adapter is 3.3V.

lindoran commented 4 years ago

I tried a different usb keyboard to the same results. my usb ttl adapter has has a 3v3 line but I need to solder headers to it so that is for later. I did try hooking the terminals together last night with the by directional shifter to try to replicate your results but I couldn't get the terminal to go past the bootup screen ... Putty sees the link but I must be doing something wrong because there are no characters on either side when I type. I might have the rx / tx lines wrong I thought I tried crossing over the link and doing straight through. I'll try more later.

On Wed, Sep 2, 2020, 12:41 AM Christian Lehner notifications@github.com wrote:

Thanks for the video. This feature works in my setup. Please try a different USB keyboard if possible, I think it probably acts different than mine. You could also try connecting your windows pc to the Pi zero. Typing on the keyboard would then be seen in putty on the Windows machine. Please only try this if your USB to TTL adapter is 3.3V.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fbergama/pigfx/issues/36#issuecomment-685313269, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQIK5ZBRZ2BMZEA7FL23WATSDXLH5ANCNFSM4QRI4YHQ .

chregu82 commented 4 years ago

Please try the following: Disconnect serial lines from the Pi and connect RX and TX pins on the pi. What you type on the USB keyboard immediately gets displayed on the Pi display. Please check if key repeat works like this.

lindoran commented 4 years ago

Will check and let you know

On Wed, Sep 2, 2020, 2:05 PM Christian Lehner notifications@github.com wrote:

Please try the following: Disconnect serial lines from the Pi and connect RX and TX pins on the pi. What you type on the USB keyboard immediately gets displayed on the Pi display. Please check if key repeat works like this.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fbergama/pigfx/issues/36#issuecomment-685938075, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQIK5ZFIOIDHRO6FLCUCRALSD2JPHANCNFSM4QRI4YHQ .

lindoran commented 4 years ago

hooked up as suggested, what is odd is it didn't work then either. But then i tried the keyboard for my main workstation just to try something else and it worked! so that's a good thing. I had tried 2 other USB keyboards and found 1 with the same issue and another that just didn't work at all. so im stumped. All of these keyboards seem to work just fine under windows. I am confident I can find a keyboard that works; I just have to keep trying keyboards.

chregu82 commented 4 years ago

I should probaly try different keyboard too. The seem to act different. With my keyboard I get events for key pressed and key released. I'm repeating until key is released.

lindoran commented 4 years ago

Thank you for the help on this. 😁 At least there is a solution

On Thu, Sep 3, 2020, 12:47 AM Christian Lehner notifications@github.com wrote:

I should probaly try different keyboard too. The seem to act different. With my keyboard I get events for key pressed and key released. I'm repeating until key is released.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/fbergama/pigfx/issues/36#issuecomment-686268575, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQIK5ZAV2RIGTNENVCZMEHTSD4UXNANCNFSM4QRI4YHQ .