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:

Post by traumatic »

Kaeru Gaman wrote:I bet, a Laptop has a broader Port than an attached Keyboard via USB or PS2....
Well, not mine ;)
THEQUIKROWFOJUPSOERHTELAZDOGSAK
:lol:
Good programmers don't comment their code. It was hard to write, should be hard to read.
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

:lol:

...but I think, we could agree it's a hardware problem, based on portwidth.
my explanation seems to be precise enough not to be critisized too much... :mrgreen:
oh... and have a nice day.
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

Post by nco2k »

logitech elite keyboard:
THE QUICK BROWN FOX JUMPS OVER THE LAZY DOGS BACK
looks like i won. :lol:

c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

Apple really thin silver keyboard - it has a stupid apple name but I don't know it! :
H CK BN FX JMS V H LAZ DG

Logitech media keyboard:
TE UIC RWN JUS VER T LAY DG
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

"DOUBLEDUTCH IS TEH AWSOME"

Didn't you work on some remote control software or..?
Last edited by thefool on Thu Jun 05, 2008 11:15 pm, edited 1 time in total.
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

ah, HAAA, haaaaaa....
Image
oh... and have a nice day.
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

Didn't you work on some remote control software or..?
Yep, still working on it. The "technology" is also being used for something else - I'm under an NDA so I can't say much about it at present! :( :twisted:
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

DoubleDutch wrote:
Didn't you work on some remote control software or..?
Yep, still working on it. The "technology" is also being used for something else - I'm under an NDA so I can't say much about it at present! :( :twisted:
yeah well with all the religious german people around here it would probably be a bad place to talk about it.
Tipperton
Addict
Addict
Posts: 1286
Joined: Thu Jun 19, 2003 7:55 pm

Post by Tipperton »

Microsoft Natural Keyboard 4000 (wired) wrote:THE QUICK BROWN FO JUMPS OVER THE LAZY DOGS BACK
As ts-soft reported, the X key doesn't work.
Kaeru Gaman wrote: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)
Nice try but not quite correct.

If the keyboard port was parallel this would be logical explanation but the keyboard port isn't parallel, it serial so there's really no limitation on how many bits you have to encode a key with.

Each key on the keyboard can send one of two codes, one for when the key is pressed and one for when it is released. It's the job of the keyboard controller to keep track of when keys are pressed and released.

The problem is that most keyboard controllers don't have enough registers so that each key gets its own register. So once the keyboard controller's registers fill up with keys that are currently pressed, it stops recording key strokes.

When you release a key that's in a register showing that key as pressed, the register is cleared so its available to hold another key so the controller starts recording key strokes again.

This limitation isn't the reason that some keys don't work when both shift keys are pressed. This problem comes from how the key switches that make up the keyboard are wired together. Usually keys are wired on something like a 10 x 10 grid where each key is at an intersection on the grid.

Now if you have the left shift key at 1,10 and the right shift key at 10,1 that's fine because when you press one shift key while holding the other shift key down, a change can still be sensed that the keyboard controller can record. But if you now press a key located at either 1,1 or 10,10 the controller will not see a change because those lines are already active because of the two shift keys being pressed, so it won't record the key stroke.

This design efficient and under most situations it works. It only becomes a problem when playing games because you frequently need to have several keys down at once. That's why some companies have started selling gaming keyboards and/or game controllers. These keyboards and controllers use a different wiring methodology for the keys themselves and use a controller that can track many more simultaneous key presses than standard controllers.
Last edited by Tipperton on Fri Jun 06, 2008 12:00 am, edited 1 time in total.
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

whoooo :shock:

thanx for this additional and mofo precize information, Lemming.. arh.. Tipperton.. ;)

no, good work, thnx.
oh... and have a nice day.
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Post by traumatic »

Yes, thank you Tipperton!
thefool wrote:[...]religious german[...]
:?: :roll:
Good programmers don't comment their code. It was hard to write, should be hard to read.
SofT MANiAC
Enthusiast
Enthusiast
Posts: 142
Joined: Mon Sep 17, 2007 10:28 am
Location: P.O.P
Contact:

Post by SofT MANiAC »

My old Mitsumi keyboard:
HE QUIK BROWN FO JUPS OER HE LA DOGS BAK
POiNT.OF.PRESENCE group
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

traumatic wrote:
thefool wrote:[...]religious german[...]
:?: :roll:
wasn't to you :roll:
Post Reply