Many strange Bugs.

Previous topic - Next topic


I encountered a lot of bugs while working on my 3D demo.
I have to admit that this is starting to worry me.
There are bugs with the KEY function, but not only.

I hope it comes from my old PC, otherwise there is really a big problem with GLBasic :(

There is a problem when mixing KEY("space") and KEY("arrow").
I don't speak English well so I'm only talking about this bug, I'll see later to explain the others (more special).


Drop a simple, few lines demo, here and we'll test it on our hardware.


"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)


Yes, like Bigsofty said, drop a test for us to try on different hardware.
I get very weird behaviour on my machine when it comes to sound, but that does not happen on any other machine tried (and I tried MANY).
In my case, it has to do with sound card without proper drivers, not a GLB bug.


If you press up + left + space, the space key doesn't work.
It's the same for down + left + space.

Code (glbasic) Select

LOCAL k_space = 57
LOCAL k_up = 200
LOCAL k_down = 208
LOCAL k_left = 203
LOCAL k_right = 205

IF KEY(k_space) THEN PRINT "Space", 0, 0

IF KEY(k_up) THEN  PRINT "Up", 0, 20
IF KEY(k_down) THEN  PRINT "Down", 0, 30
IF KEY(k_left) THEN  PRINT "Left", 0, 40
IF KEY(k_right) THEN  PRINT "Right", 0, 50



Seems to work fine on my end, I can even press all keys together and it shows.

Kitty Hello

It might be your keyboard hardware or driver. Many keyboards only support 2 keys at a time, or disallow some combinations. Can you try another keyboard?
My keyboard here has a problem, when I hold shift, and quickly type something with an 'N'. The 'N' always gets dropped. That's a pain, when you have types like
MOVING and you type MOVIG.


I used another keyboard (a microsoft) and it's the same problem.
But I can confirm that it is not GLBasic that is responsible because I programmed the same test directly in C and it's the same too.

Well ... I'll leave this bug for now, I'll use other keys for my demo.

Thank you everyone.


This is not a glbasic bug, its a keyboard hardware ghosting issue you is seeing.

This is very common in many keyboards as well, if not all.

This is depend how the matrix have been setup in the keyboard.

This is why im newer use spacebar for the main button by default.

Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 -