Re: game controller
On Sun, January 3, 2016 6:01 pm, Paul Fox wrote: > the only mistake i see in your new section is that there are 4 buttons, > not 5. At first I visualized the D-pad as a game controller and the four action buttons as a second controller. But really the two together function as a typical controller. I've done some rewriting. Hopefully it's better rather than worse. > i suspect the names came about when the PC/AT keyboard was introduced by > IBM. i think that was the first PC keyboard to have a separate > numeric keypad. (but that's just an informed guess.) Thanks. Probably not necessary in the wiki page but interesting. Regards, ... Peter E. -- Telephone 1 360 639 0202 or +13606390202. Bcc: peter at easthope.ca http://easthope.ca/Shop.html ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: game controller
peter wrote: > Greetings to all for the New Year, > > Paul Fox, pgf at laptop.org, Sat Dec 5 11:02:48 EST 2015, > > the "game controller" is simply 4 separate electrical contacts ... > > ... use 'xev' to check ... > > A "Hardware" section now in http://wiki.laptop.org/go/Game_controller . > Corrections, criticisms and suggestions welcome. the only mistake i see in your new section is that there are 4 buttons, not 5. > > Can anyone tell where the nomenclature "KP_Up" and etc. originated? > A mainframe console in the 1960s? i suspect the names came about when the PC/AT keyboard was introduced by IBM. i think that was the first PC keyboard to have a separate numeric keypad. (but that's just an informed guess.) paul =- paul fox, p...@laptop.org ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Game controller
Paul, On Sat, December 5, 2015 10:08 am, Paul Fox wrote: > that being said, it's possible to write code to handle combinations of > those keypresses (e.g., "all mashed down at once") separately from the > individual strokes. you either need to intercept the keys at a pretty low > level (scan codes) and keep track of the up and down state of every key, > or you can read the keys normally and use a user-level timer to decide > whether more than one has been pressed in very quick succession. Your replies are very helpful, thanks. I imagine the left and right controllers are the same or almost the same on the circuit board; the difference is only in the buttons. Will check next time I have the machine apart. May I add your information to http://wiki.laptop.org/go/Game_controller ? It might interest others. Thanks again, ... Peter E. -- Telephone 1 360 639 0202 or +13606390202. Bcc: peter at easthope.ca http://easthope.ca/Shop.html ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Game controller
that being said, it's possible to write code to handle combinations of those keypresses (e.g., "all mashed down at once") separately from the individual strokes. you either need to intercept the keys at a pretty low level (scan codes) and keep track of the up and down state of every key, or you can read the keys normally and use a user-level timer to decide whether more than one has been pressed in very quick succession. paul i wrote: > the "game controller" is simply 4 separate electrical contacts with a > button large enough to push them individually or together (in some > combinations). the resulting presses are reported as keyboard > keystrokes. if i remember correctly, these buttons are bound to the > "keypad" versions of the arrow keys, i.e. KP_UP, KP_RIGHT, etc. use > 'xev' to check me on this. > > paul > > peter wrote: > > Hi, > > > > I'm interested in use of the game controller or controllers in > > place of the TouchPad or mouse. This is relevant to eBook mode > > where the TouchPad is not accessible and a mouse is not convenient. > > > > This is what I have. > > [olpc@xo-53-1d-bb ~]$ cat /boot/olpc_build > > 13.2.5 for XO-1.5 (build 17) > > > > bash-4.2# evtest > > No device specified, trying to scan all of /dev/input/event* > > Available devices: > > /dev/input/event0:Lid Switch > > /dev/input/event1:Power Button > > /dev/input/event2:AT Translated Set 2 keyboard > > /dev/input/event3:EBook Switch > > /dev/input/event4:olpc-kbdshim virtual keyboard > > /dev/input/event5:SynRelPS/2 Synaptics TouchPad > > /dev/input/event6:olpc-kbdshim virtual mouse > > /dev/input/event7:USB Optical Mouse > > Select the device event number [0-7]: > > > > No mention of the Game controller. Is any joystick device present? > > > > [olpc@xo-53-1d-bb ~]$ ls -l /dev/j* > > ls: cannot access /dev/j*: No such file or directory > > > > Can any Linux software detect or communicate with this game > > controller? Ideas? > > > > > > ___ > > Devel mailing list > > Devel@lists.laptop.org > > http://lists.laptop.org/listinfo/devel > > =- > paul fox, p...@laptop.org > ___ > Devel mailing list > Devel@lists.laptop.org > http://lists.laptop.org/listinfo/devel =- paul fox, p...@laptop.org ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Game controller
the "game controller" is simply 4 separate electrical contacts with a button large enough to push them individually or together (in some combinations). the resulting presses are reported as keyboard keystrokes. if i remember correctly, these buttons are bound to the "keypad" versions of the arrow keys, i.e. KP_UP, KP_RIGHT, etc. use 'xev' to check me on this. paul peter wrote: > Hi, > > I'm interested in use of the game controller or controllers in > place of the TouchPad or mouse. This is relevant to eBook mode > where the TouchPad is not accessible and a mouse is not convenient. > > This is what I have. > [olpc@xo-53-1d-bb ~]$ cat /boot/olpc_build > 13.2.5 for XO-1.5 (build 17) > > bash-4.2# evtest > No device specified, trying to scan all of /dev/input/event* > Available devices: > /dev/input/event0: Lid Switch > /dev/input/event1: Power Button > /dev/input/event2: AT Translated Set 2 keyboard > /dev/input/event3: EBook Switch > /dev/input/event4: olpc-kbdshim virtual keyboard > /dev/input/event5: SynRelPS/2 Synaptics TouchPad > /dev/input/event6: olpc-kbdshim virtual mouse > /dev/input/event7: USB Optical Mouse > Select the device event number [0-7]: > > No mention of the Game controller. Is any joystick device present? > > [olpc@xo-53-1d-bb ~]$ ls -l /dev/j* > ls: cannot access /dev/j*: No such file or directory > > Can any Linux software detect or communicate with this game > controller? Ideas? > > > ___ > Devel mailing list > Devel@lists.laptop.org > http://lists.laptop.org/listinfo/devel =- paul fox, p...@laptop.org ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Game controller
Hi, I'm interested in use of the game controller or controllers in place of the TouchPad or mouse. This is relevant to eBook mode where the TouchPad is not accessible and a mouse is not convenient. This is what I have. [olpc@xo-53-1d-bb ~]$ cat /boot/olpc_build 13.2.5 for XO-1.5 (build 17) bash-4.2# evtest No device specified, trying to scan all of /dev/input/event* Available devices: /dev/input/event0: Lid Switch /dev/input/event1: Power Button /dev/input/event2: AT Translated Set 2 keyboard /dev/input/event3: EBook Switch /dev/input/event4: olpc-kbdshim virtual keyboard /dev/input/event5: SynRelPS/2 Synaptics TouchPad /dev/input/event6: olpc-kbdshim virtual mouse /dev/input/event7: USB Optical Mouse Select the device event number [0-7]: No mention of the Game controller. Is any joystick device present? [olpc@xo-53-1d-bb ~]$ ls -l /dev/j* ls: cannot access /dev/j*: No such file or directory Can any Linux software detect or communicate with this game controller? Ideas? ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel