Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

309
Visualizações
Sending key presses to applications

When a key is pressed, keyboard sends signal to device driver which interrupts CPU and interrupt handler is run. The pressed key is stored at address mapped to keyboard interrupt. My question is: If there are multiple processes say, editor and shell, how does kernel decide which one the received key press belongs to? I mean how does this key press get to it's destination?

Also is there way when key press goes to multiple processes?

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

I'd suggest reading up on evdev and X11, evdev is the mechanism within the linux kernel for dispatching input events (such as keyboard) X11 is the window manager.

In a multiwindow environment (i.e not a VT), the window manager (X11) determines where the keypress is routed too. Something like xdotool should be able to send keystroke to multiple windows at once. Wayland is slated to replace X11 I do not know much about how it works but it uses evdev as well.

over 4 years ago · Santiago Trujillo Relatório

0

This is what I found after reading some resources:

There is something called Foreground process groups, where among the process groups in a session at most one can be the foreground process group of that session. The tty input and tty signals (generated by ^C, ^Z, etc.) go to processes in this foreground process group.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda