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

238
Visualizações
JavaScript keydown in Chrome not capturing a single keypress that outputs multiple Unicode characters

I am working with Yiddish, for which some letters consist of two Unicode characters. For example, אַ consists of U+05D0 + U+05B7. There are single code variants of these characters (eg. U+FB2E for אַ), but most keyboards take the former approach.

I'd like to capture input from a Yiddish keyboard using keydown, but I'm having trouble with these keys that output multiple Unicode characters. In particular, I'm using a simple code:

$(document).keydown(function (event) {
    if (!event.metaKey) {
        console.log(event.key);
    }
});

See it on JSFiddle.

I'm on Windows, and on Firefox, I'm getting the expected result when I press אַ (which is the letter A on my keyboard, and outputs U+05D0 U+05B7): namely, the console logs אַ. However, on Chrome (version 98), I get "Unidentified" as the output (although I get the expected result for any key that outputs a single Unicode character). The same thing happens on Edge. I don't have a Mac, but a friend tested for me and weirder things happened: it logged the U+05B7 but not the U+05D0. Safari worked fine for him, though.

Any idea what's going on, and how to fix it?

over 4 years ago · Santiago Trujillo
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