View previous topic :: View next topic |
Author |
Message |
mambro l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/16106226304148b6e905c87.jpg)
Joined: 22 Mar 2004 Posts: 752 Location: Mira (VE) - Italy
|
Posted: Thu Jul 22, 2004 11:37 pm Post subject: [hw] file /dev tastiera |
|
|
Esiste un equivalente di /dev/input/mice per la tastiera? uso una ps2...
Mi serve perchè vorrei scrivere una specie di keylog ma nn so da dove passa tutto il flusso di dati che arriva dalla tastiera...
Grazie |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mambro l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/16106226304148b6e905c87.jpg)
Joined: 22 Mar 2004 Posts: 752 Location: Mira (VE) - Italy
|
Posted: Sat Jul 24, 2004 9:07 am Post subject: |
|
|
UP ![Crying or Very sad :cry:](images/smiles/icon_cry.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
X-Drum Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/1870365650443690caa453e.png)
Joined: 24 Aug 2003 Posts: 2517 Location: ('Modica','Trieste','Ferrara') Italy
|
Posted: Sat Jul 24, 2004 9:13 am Post subject: |
|
|
sotto linux tutto è un file per "scoprire" quale è il file device corrispondente alla tua tastiera fai:
Code: | x-drum@Thunder x-drum $ cat /proc/bus/input/devices | grep kbd
H: Handlers=event1 kbd |
in questo caso (il mio) la tastiera è associata al device /dev/input/event1
nota:UP è deprecato da questo forum ![Twisted Evil :twisted:](images/smiles/icon_twisted.gif) _________________ "...There are two sort of lies, lies and benchmarks..." |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
kartone n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 01 Jun 2004 Posts: 52
|
Posted: Sat Jul 24, 2004 10:04 am Post subject: |
|
|
Code: |
$ cat /proc/bus/input/devices | grep kbd
H: Handlers=kbd
|
Che significa? [/code] |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
X-Drum Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/1870365650443690caa453e.png)
Joined: 24 Aug 2003 Posts: 2517 Location: ('Modica','Trieste','Ferrara') Italy
|
Posted: Sat Jul 24, 2004 2:52 pm Post subject: |
|
|
da quello che ho capito ti interessa sapere il nome del device al quale è associata la tastiera......
se cosi fosse lanciando il comando:
Code: | cat /proc/bus/input/devices | grep kbd |
in una shell, ti dovrebbe ritornare una riga del tipo:
Code: | H: Handlers=eventXX kbd |
dove XX è un numero che puo' variare da pc a pc da me è 1 quindi il device associato alla mia tastiera è : /dev/input/event1 ....
se XX invece fosse 2 sarebbe /dev/input/event2
spero di essere stao abbastanza chiaro e di aver compreso la tua domanda
ciao _________________ "...There are two sort of lies, lies and benchmarks..." |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
motaboy Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/146642313240262a7185133.png)
Joined: 15 Dec 2003 Posts: 1483
|
Posted: Sat Jul 24, 2004 3:07 pm Post subject: |
|
|
Visto che non ti da eventXX, vuol dire che non hai compilato e/o caricato il modulo "evdev". _________________ ... |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mambro l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/16106226304148b6e905c87.jpg)
Joined: 22 Mar 2004 Posts: 752 Location: Mira (VE) - Italy
|
Posted: Sat Jul 24, 2004 9:13 pm Post subject: |
|
|
Code: |
mambro@terra mambro $ cat /proc/bus/input/devices
I: Bus=0011 Vendor=0002 Product=0002 Version=0034
N: Name="PS2++ Logitech Wheel Mouse"
P: Phys=isa0060/serio1/input0
H: Handlers=mouse0
B: EV=7
B: KEY=f0000 0 0 0 0 0 0 0 0
B: REL=103
I: Bus=0011 Vendor=0001 Product=0001 Version=ab41
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
H: Handlers=kbd
B: EV=120003
B: KEY=4 2000000 3802078 f840d001 f2ffffdf ffefffff ffffffff fffffffe
B: LED=7
|
e
Code: |
mambro@terra mambro $ ls -l /dev/input
total 0
crw-r--r-- 1 root root 13, 63 Jan 1 1970 mice
crw-r--r-- 1 root root 13, 32 Jan 1 1970 mouse0
|
Evidentemente nn ho messo nel kernel "evdev"... dove lo trovo? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
motaboy Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/146642313240262a7185133.png)
Joined: 15 Dec 2003 Posts: 1483
|
Posted: Sun Jul 25, 2004 12:49 pm Post subject: |
|
|
In device drivers sotto la sezione di input. _________________ ... |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|