xev / xmodmap: parentesi quadra sinistra che non invia keypress sul layout misto US / JP


0

Sto cercando di identificare il motivo per cui la mia tastiera USB esterna non sta inviando un tasto sinistro della staffa. Configurazione: laptop con layout tastiera PC104 giapponese, tastiera USB Kinesis con layout PC104 americano. Quando si usa setxkbmap -model pc104 -layout japan -option japan, i tasti come leggibili sul laptop inviano i tasti corretti per la parentesi sinistra / sinistra e la parentesi graffa destra / sinistra, così come per @ e "e la barra rovesciata .Questi sono i tasti che si trovano in una posizione diversa sul layout giapponese, quindi la configurazione è necessaria. Tuttavia, quando uso una tastiera americana come sopra e imposta la configurazione su:

setxkbmap -model pc104 -layout us

O

setkxbmap -mode kinesis -layout us

la parentesi sinistra non funziona, né sulla tastiera USB o sulla tastiera per laptop cablata (quando si preme il PC 104 equivalente a sinistra della staffa USA, che è @ sulla legenda giapponese). Parentesi sinistra, che è maiusc + parentesi sinistra, funziona bene.

utilizzando xbindkeys -k: Staffa destra:

"(Scheme function)"
    m:0x0 + c:35
    bracketright

Parentesi sinistra: nessuna uscita prodotta

Ecco l'output di xmodmap:

xmodmap -pk | grep -i bracket
     34     0x005b (bracketleft)    0x007b (braceleft)  0x005b (bracketleft)    0x007b (braceleft)  
     35     0x005d (bracketright)   0x007d (braceright) 0x005d (bracketright)   0x007d (braceright) 

Ecco l'output di s howkey --scancodes: (ha aggiunto i nomi delle chiavi)

bracket left 0x1a 0x9a 
bracket right 0x1b 0x9b
(shift) brace left 0x2a 0x1a 0x9a 0xaa
(shift) brace right 0x2a 0x1b 0x9b 0xaa

Ecco l'output di xev quando premi la parentesi destra, corri destra, parentesi sinistra, corri a sinistra, in questo ordine:

KeyPress event, serial 32, synthetic NO, window 0x2000001,
    root 0xd6, subw 0x0, time 28558548, (862,569), root:(862,569),
    state 0x0, keycode 35 (keysym 0x5d, bracketright), same_screen YES,
    XLookupString gives 1 bytes: (5d) "]"
    XmbLookupString gives 1 bytes: (5d) "]"
    XFilterEvent returns: False

KeyRelease event, serial 32, synthetic NO, window 0x2000001,
    root 0xd6, subw 0x0, time 28558694, (862,569), root:(862,569),
    state 0x0, keycode 35 (keysym 0x5d, bracketright), same_screen YES,
    XLookupString gives 1 bytes: (5d) "]"
    XFilterEvent returns: False

KeyPress event, serial 32, synthetic NO, window 0x2000001,
    root 0xd6, subw 0x0, time 28558890, (862,569), root:(862,569),
    state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 32, synthetic NO, window 0x2000001,
    root 0xd6, subw 0x0, time 28558968, (862,569), root:(862,569),
    state 0x1, keycode 35 (keysym 0x7d, braceright), same_screen YES,
    XLookupString gives 1 bytes: (7d) "}"
    XmbLookupString gives 1 bytes: (7d) "}"
    XFilterEvent returns: False

KeyRelease event, serial 32, synthetic NO, window 0x2000001,
    root 0xd6, subw 0x0, time 28559092, (862,569), root:(862,569),
    state 0x1, keycode 35 (keysym 0x7d, braceright), same_screen YES,
    XLookupString gives 1 bytes: (7d) "}"
    XFilterEvent returns: False

KeyRelease event, serial 32, synthetic NO, window 0x2000001,
    root 0xd6, subw 0x0, time 28559208, (862,569), root:(862,569),
    state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

--- & gt; il tasto sinistro della parentesi quadra si presenta qui

FocusOut event, serial 32, synthetic NO, window 0x2000001,
    mode NotifyGrab, detail NotifyAncestor

FocusOut event, serial 32, synthetic NO, window 0x2000001,
    mode NotifyUngrab, detail NotifyPointer

FocusIn event, serial 32, synthetic NO, window 0x2000001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 32, synthetic NO, window 0x0,
    keys:  4294967265 0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

--- & gt; tasto sinistro della staffa di sinistra

KeyPress event, serial 32, synthetic NO, window 0x2000001,
    root 0xd6, subw 0x0, time 28561835, (862,569), root:(862,569),
    state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 32, synthetic NO, window 0x2000001,
    root 0xd6, subw 0x0, time 28561916, (862,569), root:(862,569),
    state 0x1, keycode 34 (keysym 0x7b, braceleft), same_screen YES,
    XLookupString gives 1 bytes: (7b) "{"
    XmbLookupString gives 1 bytes: (7b) "{"
    XFilterEvent returns: False

KeyRelease event, serial 32, synthetic NO, window 0x2000001,
    root 0xd6, subw 0x0, time 28562064, (862,569), root:(862,569),
    state 0x1, keycode 34 (keysym 0x7b, braceleft), same_screen YES,
    XLookupString gives 1 bytes: (7b) "{"
    XFilterEvent returns: False

C'è qualcosa che mi manca qui? La chiave è ovviamente funzionante e invia parentesi sinistra. Tutti gli altri tasti come backslash e @ che verrebbero associati al layout giapponese non mostrano alcun problema durante l'utilizzo setxkbmap -model pc104 -layout us. La staffa sinistra viene catturata da qualcos'altro?


Non sono sicuro di aver capito correttamente la domanda: hai xbindkeys attivo durante il test con xev eccetera.? Ad ogni modo, gli eventi di Focus in xev indica che alcune altre applicazioni stanno rubando gli eventi della tastiera, ed è per questo che non li vedi. Quello potrebbe essere il window manager, xbindkeyso qualche altra applicazione.
dirkt

Scusa se non era chiaro. Erano tutti comandi autonomi, separati, non funzionanti o sovrapposti. Li ho appena usati per cercare di isolare quello che stava succedendo. Cosa potrebbe rubare la parentesi sinistra senza premere i tasti mod? Ho solo 'dwm' in esecuzione e barebone GTK. 'dwm' non ha alcun comando che corrisponda alla parentesi sinistra, e comunque tutti i comandi in dwm richiedono una modkey. Ho controllato il suo makefile (funziona come un file di configurazione) e non c'è niente fuori dall'ordinario. C'è un modo in cui posso eseguire una traccia su cosa sta catturando il keypress?
user741768

Non ho idea di cosa ruberebbe l'evento della parentesi sinistra - ne sono sorpreso quanto te. Soprattutto perché non sembra accadere con l'altro layout di tastiera - se qualche app lo ruba, dovrebbe essere indipendente dal layout. Non conosco alcun modo per rintracciarlo. xlsclients può aiutare, come può uccidere tutto ciò che non fai assolutamente bisogno, come la maggior parte di GTK. O provare un WM diverso.
dirkt
Utilizzando il nostro sito, riconosci di aver letto e compreso le nostre Informativa sui cookie e Informativa sulla privacy.
Licensed under cc by-sa 3.0 with attribution required.