Strange behaviour with both shift-keys pressed

For everything that's not in any way related to PureBasic. General chat etc...
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Strange behaviour with both shift-keys pressed

Post by traumatic »

Did you know that some characters don't work when both shift keys are pressed on your keyboard?

Try to write the following with both shift-keys down:
THE QUICK BROWN FOX JUMPS OVER THE LAZY DOGS BACK
My result:
HE QUIC BROWN OX UMP OVER HE Y OG BC
Does anyone know why? Is this some kind of controller limitation or some windows tasks running in the background?
Good programmers don't comment their code. It was hard to write, should be hard to read.
zikitrake
Addict
Addict
Posts: 878
Joined: Thu Mar 25, 2004 2:15 pm
Location: Spain

Re: Strange behaviour with both shift-keys pressed

Post by zikitrake »

:lol: My result is ok
THE QUICK BROWN FOX JUMPS OVER THE LAZY DOGS BACK
PB 6.21 beta, PureVision User
DarkDragon
Addict
Addict
Posts: 2347
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Post by DarkDragon »

You don't have an internal speaker, right? Otherwise it would go crazy if you hold shiftl+shiftr+t. Its a hardware limitation of your keyboard (It's on 90% of all keyboards, but sometimes with different keys). There are also some other combinations which don't work (Just try it out: press all keys down with your hand and it won't write anything anymore [a-s-x-c for example]).
Last edited by DarkDragon on Thu Jun 05, 2008 10:47 am, edited 1 time in total.
bye,
Daniel
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

THE QUICK BROWN FO JUMPS OVER THE LAZY DOGS BACK
X doesn't work on MS Keyboard with doubleshift :shock:
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

It's because of the wireing inside the keyboard.
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Post by traumatic »

Trond wrote:It's because of the wireing inside the keyboard.
Do you happen to have some more in-depth information on this? Thank you!
Good programmers don't comment their code. It was hard to write, should be hard to read.
User avatar
djes
Addict
Addict
Posts: 1806
Joined: Sat Feb 19, 2005 2:46 pm
Location: Pas-de-Calais, France

Post by djes »

I had this problem in a game using several keys (for two players). If you define an action on each shift keys, sometimes they're not detected, or the others keys! Annoying! A solution is for the player 1 to use the shift key, and the other with CTRL.
In fact, there's this problem if you're using the same row of keys.
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6172
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

MS Natural Keybaord:

TE UIC RWN JUS VER TE LAY DG

HP laptop keyboard:

THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

5 year old Packard Bell laptop keyboard:
THEQUIKROWFOJUPSOERTHELAYDOG

JAKDAWSLOESYIGSPHIOFQUART
(Jackdaws loves my big sphinx of quartz)

Is this the first where the space key doesn't work?

Here is more information (I didn't read it): http://www.dribin.org/dave/keyboard/one_html/
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Post by traumatic »

Great, thanks Trond!
Good programmers don't comment their code. It was hard to write, should be hard to read.
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6172
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

Now we get countless experiments on incompatible keyboards :-) A new PureBasic FAD (TM) has been born!
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

I'd like to try an explanation why this behaviour occurs.

the keys pressed have to be encoded some way to be sent via the port where the keyboard communicated with the mainboard.
this port has a limited width.

to encode a keyboard with over 100 keys in a way that each keypress can occur at the same time,
the port needs a width of 128bit (1bit for every key)

when the port is narrower, the keypresses have to be encoded in a way that some combinations cannot be encoded correctly.
since in no normal cases one would use both shift-keys at the same time, this is a combination you can easily leave out.

hope that explanation is correct enough, I know the problem for a long time, but I never read long essays about it.
oh... and have a nice day.
User avatar
Demivec
Addict
Addict
Posts: 4281
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Post by Demivec »

My Logitech keyboard's pathetic performance:
H UICK BON FOX JUMPS OV H LAZ DOGS BACK
Derek
Addict
Addict
Posts: 2354
Joined: Wed Apr 07, 2004 12:51 am
Location: England

Post by Derek »

My HP laptop gives a perfect result whereas my logitech is just as bad as Demivec's.
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

I bet, a Laptop has a broader Port than an attached Keyboard via USB or PS2....
oh... and have a nice day.
Post Reply