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

181
Visualizações
Gnome extension keybinding latency

I am building out a gnome extension that will allow me to have several keybinding shortcuts. The first one I am trying to tackle is HJKL for arrow keys like in vim. I am using the following code to accomplish this:

let mode = Shell.ActionMode.ALL;
let flag = Meta.KeyBindingFlags.NONE;
let settings = getSettings();    

Main.wm.addKeybinding("left-h", settings, flag, mode, () => log('test') );

here is the shortcut schema:

<key type="as" name="left-h">
    <default><![CDATA[['h']]]></default>
    <summary>The shortcut key</summary>
    <description>You can create GTK entry in pref and set it as CDATA</description>
</key>

This all works as expected. My only issue is that there is about one second of latency when the key is pressed to when there is a log to the output. My first thought was that the log is just slow, so I set it up to call a python script with spawn_command_line_sync that is responsible for simulating a key press which also had ~1s of latency after the button was pressed to when the command fired. (I am using a python script for this because I couldn't find a way to press keys via GJS) Is it possible to get rid of that latency? Right now they keybindings are unusable because of it.

about 4 years ago · Juan Pablo Isaza
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