AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • Início
  • system&network
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • Início
  • system&network
    • Recentes
    • Highest score
    • tags
  • Ubuntu
    • Recentes
    • Highest score
    • tags
  • Unix
    • Recentes
    • tags
  • DBA
    • Recentes
    • tags
  • Computer
    • Recentes
    • tags
  • Coding
    • Recentes
    • tags
Início / ubuntu / Perguntas / 1526449
Accepted
Pansmanser
Pansmanser
Asked: 2024-09-11 23:38:18 +0800 CST2024-09-11 23:38:18 +0800 CST 2024-09-11 23:38:18 +0800 CST

Como remapear a tecla Copilot do Windows no Ubuntu?

  • 772

insira a descrição da imagem aquiTenho um laptop Dell (inspiron 16 5645). Além da tecla Super, ele tem outra tecla que me disseram ser a tecla copiloto do Windows. Ela parece se comportar como a tecla shift esquerda, e o xev a relata como o mesmo código de tecla, mas presumivelmente o Windows consegue distingui-la.

Posso fazer algo útil com ele? Quero mapeá-lo para o right-ctrl, que está ausente.

Editar: saída do terminal adicionada: - A janela externa é 0x800001, a janela interna é 0x800002

PropertyNotify event, serial 8, synthetic NO, window 0x800001,
    atom 0x27 (WM_NAME), time 74036986, state PropertyNewValue
PropertyNotify event, serial 9, synthetic NO, window 0x800001,
    atom 0x22 (WM_COMMAND), time 74036986, state PropertyNewValue
PropertyNotify event, serial 10, synthetic NO, window 0x800001,
    atom 0x28 (WM_NORMAL_HINTS), time 74036986, state PropertyNewValue
CreateNotify event, serial 11, synthetic NO, window 0x800001,
    parent 0x800001, window 0x800002, (10,10), width 50, height 50
border_width 4, override NO
PropertyNotify event, serial 14, synthetic NO, window 0x800001,
    atom 0xf9 (WM_PROTOCOLS), time 74036986, state PropertyNewValue
MapNotify event, serial 15, synthetic NO, window 0x800001,
    event 0x800001, window 0x800002, override NO
ConfigureNotify event, serial 21, synthetic NO, window 0x800001,
    event 0x800001, window 0x800001, (0,0), width 178, height 178,
    border_width 0, above 0x600109, override NO
PropertyNotify event, serial 28, synthetic NO, window 0x800001,
    atom 0x16f (_NET_WM_ALLOWED_ACTIONS), time 74036986, state PropertyNewValue
PropertyNotify event, serial 29, synthetic NO, window 0x800001,
    atom 0x153 (_MUTTER_NEEDS_FRAME), time 74036986, state PropertyNewValue
PropertyNotify event, serial 29, synthetic NO, window 0x800001,
    atom 0x101 (_NET_WM_DESKTOP), time 74036986, state PropertyNewValue
PropertyNotify event, serial 31, synthetic NO, window 0x800001,
    atom 0x13b (WM_STATE), time 74036987, state PropertyNewValue
PropertyNotify event, serial 31, synthetic NO, window 0x800001,
    atom 0x107 (_NET_WM_STATE), time 74036987, state PropertyNewValue
PropertyNotify event, serial 31, synthetic NO, window 0x800001,
    atom 0x131 (_GTK_EDGE_CONSTRAINTS), time 74036987, state PropertyNewValue
ConfigureNotify event, serial 34, synthetic NO, window 0x800001,
    event 0x800001, window 0x800001, (50,32), width 178, height 178,
    border_width 0, above 0x600109, override NO
PropertyNotify event, serial 34, synthetic NO, window 0x800001,
    atom 0x131 (_GTK_EDGE_CONSTRAINTS), time 74036988, state PropertyNewValue
ReparentNotify event, serial 34, synthetic NO, window 0x800001,
    event 0x800001, window 0x800001, parent 0xa001a0,
    (0,0), override NO
PropertyNotify event, serial 34, synthetic NO, window 0x800001,
    atom 0xfe (_NET_FRAME_EXTENTS), time 74037001, state PropertyNewValue
ConfigureNotify event, serial 34, synthetic NO, window 0x800001,
    event 0x800001, window 0x800001, (14,49), width 178, height 178,
    border_width 0, above 0xa001a1, override NO
MapNotify event, serial 35, synthetic NO, window 0x800001,
    event 0x800001, window 0x800001, override NO
VisibilityNotify event, serial 35, synthetic NO, window 0x800001,
    state VisibilityUnobscured
Expose event, serial 35, synthetic NO, window 0x800001,
    (0,0), width 178, height 10, count 3
Expose event, serial 35, synthetic NO, window 0x800001,
    (0,10), width 10, height 58, count 2
Expose event, serial 35, synthetic NO, window 0x800001,
    (68,10), width 110, height 58, count 1
Expose event, serial 35, synthetic NO, window 0x800001,
    (0,68), width 178, height 110, count 0
ConfigureNotify event, serial 35, synthetic YES, window 0x800001,
    event 0x800001, window 0x800001, (198,217), width 178, height 178,
    border_width 2, above 0x0, override NO
PropertyNotify event, serial 35, synthetic NO, window 0x800001,
    atom 0x107 (_NET_WM_STATE), time 74037002, state PropertyNewValue
FocusIn event, serial 35, synthetic NO, window 0x800001,
    mode NotifyNormal, detail NotifyNonlinear
KeymapNotify event, serial 35, synthetic NO, window 0x0,
    keys:  1   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   
PropertyNotify event, serial 35, synthetic NO, window 0x800001,
    atom 0x107 (_NET_WM_STATE), time 74037005, state PropertyNewValue
PropertyNotify event, serial 35, synthetic NO, window 0x800001,
    atom 0x107 (_NET_WM_STATE), time 74037005, state PropertyNewValue
EnterNotify event, serial 35, synthetic NO, window 0x800001,
    root 0x3d1, subw 0x0, time 74037005, (155,114), root:(355,333),
    mode NotifyNormal, detail NotifyNonlinear, same_screen YES,
    focus YES, state 0
KeymapNotify event, serial 35, synthetic NO, window 0x0,
    keys:  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   0   
PropertyNotify event, serial 35, synthetic NO, window 0x800001,
    atom 0x107 (_NET_WM_STATE), time 74037016, state PropertyNewValue
KeyRelease event, serial 35, synthetic NO, window 0x800001,
    root 0x3d1, subw 0x0, time 74037112, (155,114), root:(355,333),
    state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
    XLookupString gives 1 bytes: (0d) "
"
    XFilterEvent returns: False
KeyPress event, serial 38, synthetic NO, window 0x800001,
    root 0x3d1, subw 0x0, time 74043466, (155,114), root:(355,333),
    state 0x40, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False
KeyRelease event, serial 38, synthetic NO, window 0x800001,
    root 0x3d1, subw 0x0, time 74043594, (155,114), root:(355,333),
    state 0x41, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False
LeaveNotify event, serial 38, synthetic NO, window 0x800001,
    root 0x3d1, subw 0x0, time 74047709, (-12,-47), root:(188,172),
    mode NotifyNormal, detail NotifyAncestor, same_screen YES,
    focus YES, state 0
ClientMessage event, serial 38, synthetic YES, window 0x800001,
    message_type 0xf9 (WM_PROTOCOLS), format 32, message 0xf7 (WM_DELETE_WINDOW)
keyboard
  • 2 2 respostas
  • 300 Views

2 respostas

  • Voted
  1. TheBlackKoala
    2024-09-27T22:09:30+08:002024-09-27T22:09:30+08:00

    Então eu tive um problema parecido, exceto por ser um usuário de arch e ter um lenovo com uma chave copilot. O que funcionou para mim foi o seguinte script (após instalar o evsieve):

    sudo setkeycodes 6e 193 #Catch unknown keycode and make it into left-meta
    sudo /usr/bin/evsieve\
         --input "/dev/input/by-path/platform-i8042-serio-0-event-kbd" grab=auto persist=exit\ #Setup keyboard
         --hook key:leftmeta key:leftshift key:f23 sequential period=0.032 send-key=key:leftctrl\ #Capture left-meta, left-shift and f23 (the copilot button as it is now) and produce a leftctrl
         --withhold key:leftmeta key:leftshift key:f23\ #Don't send copilot button
         --output create-link="/dev/input/by-path/platform-i8042-serio-0-event-kbd-evsieve" #More keyboard things - i think
    

    E o original (não consegui executar com comentários no bash):

    sudo setkeycodes 6e 193
    sudo /usr/bin/evsieve\
         --input "/dev/input/by-path/platform-i8042-serio-0-event-kbd" grab=auto persist=exit\
         --hook key:leftmeta key:leftshift key:f23 sequential period=0.032 send-key=key:leftctrl\
         --withhold key:leftmeta key:leftshift key:f23\
         --output create-link="/dev/input/by-path/platform-i8042-serio-0-event-kbd-evsieve" #More keyboard things - i think
    
    • 1
  2. Best Answer
    chase chen
    2024-10-01T19:38:30+08:002024-10-01T19:38:30+08:00
    1. a tecla copilot do Windows é igual a leftshift+leftmeta no Ubuntu. Você pode testá-la com o evsieve.

    2. você pode remapear a tecla copiloto por keyd. adicione o conteúdo inferior no arquivo de configuração do keyd.

    rvaiya/keyd: Um daemon de remapeamento de chaves para Linux.

    leftshift+leftmeta = overload(control, esc)
    
    • 1

relate perguntas

Sidebar

Stats

  • Perguntas 205573
  • respostas 270741
  • best respostas 135370
  • utilizador 68524
  • Highest score
  • respostas
  • Marko Smith

    Existe um comando para listar todos os usuários? Também para adicionar, excluir, modificar usuários, no terminal?

    • 9 respostas
  • Marko Smith

    Como excluir um diretório não vazio no Terminal?

    • 4 respostas
  • Marko Smith

    Como descompactar um arquivo zip do Terminal?

    • 9 respostas
  • Marko Smith

    Como instalo um arquivo .deb por meio da linha de comando?

    • 11 respostas
  • Marko Smith

    Como instalo um arquivo .tar.gz (ou .tar.bz2)?

    • 14 respostas
  • Marko Smith

    Como listar todos os pacotes instalados

    • 24 respostas
  • Martin Hope
    Flimm Como posso usar o docker sem sudo? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    led-Zepp Como faço para salvar a saída do terminal em um arquivo? 2014-02-15 11:49:07 +0800 CST
  • Martin Hope
    ubuntu-nerd Como descompactar um arquivo zip do Terminal? 2011-12-11 20:37:54 +0800 CST
  • Martin Hope
    TheXed Como instalo um arquivo .deb por meio da linha de comando? 2011-05-07 09:40:28 +0800 CST
  • Martin Hope
    Ivan Como listar todos os pacotes instalados 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    David Barry Como determino o tamanho total de um diretório (pasta) na linha de comando? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher "Os seguintes pacotes foram retidos:" Por que e como resolvo isso? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford Como os PPAs podem ser removidos? 2010-07-30 01:09:42 +0800 CST

Hot tag

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • Início
  • Perguntas
    • Recentes
    • Highest score
  • tag
  • help

Footer

AskOverflow.Dev

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve