Descobrindo quais são seus dispositivos de entrada
Publicado por Fábio Berbert de Paula em 17/05/2020
[ Hits: 3.147 ]
Blog: https://fabio.automatizando.dev
I: Bus=0019 Vendor=0000 Product=0001 Version=0000 N: Name="Power Button" P: Phys=PNP0C0C/button/input0 S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input0 U: Uniq= H: Handlers=kbd event0 B: PROP=0 B: EV=3 B: KEY=10000000000000 0 I: Bus=0019 Vendor=0000 Product=0001 Version=0000 N: Name="Power Button" P: Phys=LNXPWRBN/button/input0 S: Sysfs=/devices/LNXSYSTM:00/LNXPWRBN:00/input/input1 U: Uniq= H: Handlers=kbd event1 B: PROP=0 B: EV=3 B: KEY=10000000000000 0 I: Bus=0019 Vendor=0000 Product=0006 Version=0000 N: Name="Video Bus" P: Phys=LNXVIDEO/video/input0 S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input2 U: Uniq= H: Handlers=kbd event2 B: PROP=0 B: EV=3 B: KEY=3e000b00000000 0 0 0 I: Bus=0003 Vendor=258a Product=0001 Version=0110 N: Name="SINO WEALTH USB KEYBOARD" P: Phys=usb-0000:00:1a.0-1.3/input0 S: Sysfs=/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1-1.3:1.0/0003:258A:0001.0001/input/input3 U: Uniq= H: Handlers=sysrq kbd leds event3 B: PROP=0 B: EV=120013 B: KEY=1000000000007 ff9f207ac14057ff febeffdfffefffff fffffffffffffffe B: MSC=10 B: LED=7 I: Bus=0003 Vendor=258a Product=0001 Version=0110 N: Name="SINO WEALTH USB KEYBOARD System Control" P: Phys=usb-0000:00:1a.0-1.3/input1 S: Sysfs=/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1-1.3:1.1/0003:258A:0001.0002/input/input4 U: Uniq= H: Handlers=kbd event4 B: PROP=0 B: EV=13 B: KEY=c000 10000000000000 0 B: MSC=10 I: Bus=0003 Vendor=258a Product=0001 Version=0110 N: Name="SINO WEALTH USB KEYBOARD Consumer Control" P: Phys=usb-0000:00:1a.0-1.3/input1 S: Sysfs=/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1-1.3:1.1/0003:258A:0001.0002/input/input5 U: Uniq= H: Handlers=kbd event5 B: PROP=0 B: EV=13 B: KEY=2a000000000 0 0 1000002000000 3878d8011001 e000000000000 0 B: MSC=10 I: Bus=0003 Vendor=046d Product=c408 Version=0110 N: Name="Logitech USB Trackball" P: Phys=usb-0000:00:1a.0-1.4/input0 S: Sysfs=/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.0/0003:046D:C408.0003/input/input6 U: Uniq= H: Handlers=mouse0 event6 B: PROP=0 B: EV=17 B: KEY=1f0000 0 0 0 0 B: REL=3 B: MSC=10 I: Bus=0010 Vendor=001f Product=0001 Version=0100 N: Name="PC Speaker" P: Phys=isa0061/input0 S: Sysfs=/devices/platform/pcspkr/input/input7 U: Uniq= H: Handlers=kbd event7 B: PROP=0 B: EV=40001 B: SND=6 I: Bus=0000 Vendor=0000 Product=0000 Version=0000 N: Name="HDA Intel PCH Rear Mic" P: Phys=ALSA S: Sysfs=/devices/pci0000:00/0000:00:1b.0/sound/card0/input8 U: Uniq= H: Handlers=event8 B: PROP=0 B: EV=21 B: SW=10 I: Bus=0000 Vendor=0000 Product=0000 Version=0000 N: Name="HDA Intel PCH Line" P: Phys=ALSA S: Sysfs=/devices/pci0000:00/0000:00:1b.0/sound/card0/input9 U: Uniq= H: Handlers=event9 B: PROP=0 B: EV=21 B: SW=2000 I: Bus=0000 Vendor=0000 Product=0000 Version=0000 N: Name="HDA Intel PCH Headphone" P: Phys=ALSA S: Sysfs=/devices/pci0000:00/0000:00:1b.0/sound/card0/input10 U: Uniq= H: Handlers=event10 B: PROP=0 B: EV=21 B: SW=4 I: Bus=0000 Vendor=0000 Product=0000 Version=0000 N: Name="HDA Intel PCH HDMI/DP,pcm=3" P: Phys=ALSA S: Sysfs=/devices/pci0000:00/0000:00:1b.0/sound/card0/input11 U: Uniq= H: Handlers=event11 B: PROP=0 B: EV=21 B: SW=140 I: Bus=0000 Vendor=0000 Product=0000 Version=0000 N: Name="HDA Intel PCH HDMI/DP,pcm=7" P: Phys=ALSA S: Sysfs=/devices/pci0000:00/0000:00:1b.0/sound/card0/input12 U: Uniq= H: Handlers=event12 B: PROP=0 B: EV=21 B: SW=140 I: Bus=0000 Vendor=0000 Product=0000 Version=0000 N: Name="HDA Intel PCH HDMI/DP,pcm=8" P: Phys=ALSA S: Sysfs=/devices/pci0000:00/0000:00:1b.0/sound/card0/input13 U: Uniq= H: Handlers=event13 B: PROP=0 B: EV=21 B: SW=140 I: Bus=0003 Vendor=046d Product=0825 Version=0012 N: Name="UVC Camera (046d:0825)" P: Phys=usb-0000:00:14.0-2/button S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/input/input14 U: Uniq= H: Handlers=kbd event14 B: PROP=0 B: EV=3 B: KEY=100000 0 0 0Muita informação na tela não é verdade? O que nos importa na saída são as linhas "Name" e "Handlers", então vamos usar a combinação do comando grep para filtrá-las e o paste para colocá-las na mesma linha:
N: Name="Power Button" H: Handlers=kbd event0 N: Name="Power Button" H: Handlers=kbd event1 N: Name="Video Bus" H: Handlers=kbd event2 N: Name="SINO WEALTH USB KEYBOARD" H: Handlers=sysrq kbd leds event3 N: Name="SINO WEALTH USB KEYBOARD System Control" H: Handlers=kbd event4 N: Name="SINO WEALTH USB KEYBOARD Consumer Control" H: Handlers=kbd event5 N: Name="Logitech USB Trackball" H: Handlers=mouse0 event6 N: Name="PC Speaker" H: Handlers=kbd event7 N: Name="HDA Intel PCH Rear Mic" H: Handlers=event8 N: Name="HDA Intel PCH Line" H: Handlers=event9 N: Name="HDA Intel PCH Headphone" H: Handlers=event10 N: Name="HDA Intel PCH HDMI/DP,pcm=3" H: Handlers=event11 N: Name="HDA Intel PCH HDMI/DP,pcm=7" H: Handlers=event12 N: Name="HDA Intel PCH HDMI/DP,pcm=8" H: Handlers=event13 N: Name="UVC Camera (046d:0825)" H: Handlers=kbd event14Agora sim ficou fácil identificar os dispositivos de entrada! No meu caso o "Rear Mic" (microfone traseiro) está no "event8", ou seja, /dev/input/event8.
Como checar a temperatura do processador via linha de comando
Como fazer o editor Vim mostrar/ocultar os números das linhas
Extraindo seu endereço IP com shell script (egrep + awk)
MongoDB Community Edition 4.2 no Debian 10 Buster
Emulador de Terminal "Bombado" no Vim
Faça sua rede sem fio funcionar no Positivo V43
Mais uma: HSP57 AMR + kernel 2.6
Slackware: melhor distro para notebook Dell Inspiron N4030?
Alterando o tamanho das fontes dos navegadores
Os "perigos" de vender discos usados (mesmo formatados) ou com defeito nos sites de venda online
Criando um painel de controle (Dashboard) para seu servidor com o Homepage
O Abismo entre o Código e o Chão: Saltos Tecnológicos e a Exclusão Estrutural no Brasil
Instalar e Configurar a santíssima trindade (PAP) no Void Linux
Conhecendo o tmux: Multiplexador de Terminal
Acessando página do Syncthing fora da máquina local
[Resolvido] Meu monitor suporta 100fps. Por que o máximo é 60fps nos jogos?
Como instalo o Clipper/Harbour no Linux Ubuntu (3)









