Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

control n’est pas reconnu par kitty sous macos #237

Open
brabalan opened this issue Sep 9, 2024 · 1 comment
Open

control n’est pas reconnu par kitty sous macos #237

brabalan opened this issue Sep 9, 2024 · 1 comment

Comments

@brabalan
Copy link

brabalan commented Sep 9, 2024

Dans la discussion de ce bug kovidgoyal/kitty#7841, il semblerait que ergo‑l soit en cause :

I am saying your custom layout is SENDING TEXT for ctrl-a so kitty will treat that key press as generating text not as a control key. As it should.

Je ne suis pas sûr de comprendre ce que cela veut dire, mais visiblement il y a un problème avec le keylayout généré (tout fonctionne quand je passe en qwerty système).

@arobase-che
Copy link

arobase-che commented Jan 21, 2025

Ok, donc je viens de sortir d'une débable similaire sur Arch Linux.
Est-ce que macos utilise xkeyboard-config ?!!!


Turn out, it's not a problem with Kitty. It comes from xkeyboard-config where Hyper and the "dead key" (ISO_Level5_Latch) are mapped together.

Il s'avère que le problème ne vient pas de Kitty mais de xkeyboard-config où la touche Hyper et "la touche morte" (ISO_Level5_Latch) sont mappées ensemble.

En résumé, c'est du coté d'xkeyboard-config et bientôt mergé. J'ai compilé la version prochaine et ça marche.

J'attendrais la release 2.44 (prévue pour le 5 février, bientôt dans les dépôt d'Arch).

Sur Arch Linux, on utilise les paquets AUR pour des cas comme ça. Voici le mien :

pkgname=xkeyboard-config-git
pkgver=2.43_ache
pkgrel=1
pkgdesc="X keyboard configuration files ache"
arch=($CARCH)
license=('custom')
url="https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config"
makedepends=(git xorg-xkbcomp libxslt python meson git)
conflicts=(${pkgname%-git} xkbdata xkbdata-git)
provides=(${pkgname%-git} xkbdata xkbdata-git)
replaces=(xkbdata-git)
source=("git+https://gitlab.freedesktop.org/wismill/xkeyboard-config.git#branch=modifiers/optional-mod3-mappings")
sha256sums=('SKIP')

pkgver() {
  cd ${pkgname%-git}
  _ver="$(git describe | sed 's/^[^[:digit:]]*-//;s/-[^-]*$//;s/^v//;s/-.*//')"
  echo "${_ver}_r$(git rev-list --count HEAD).g$(git rev-parse --short HEAD)"
}

build() {
  cd ${pkgname%-git}
  arch-meson build \
    -D xkb-base="/usr/share/X11/xkb" \
    -D compat-rules=true \
    -D xorg-rules-symlinks=true


  # Print config
  # meson configure -C build

  meson compile -C build
 }
 
 package() { 
  cd ${pkgname%-git}
  DESTDIR="$pkgdir" meson install -C build

  install -m755 -d "${pkgdir}/var/lib/xkb"
  install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
  # install -m644 ${pkgname}-${pkgver}/COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
}

Kitty en mode debug donne ça :

$ kitty --debug-keyboard
[0,044] Loading new XKB keymaps
[0,047] Modifier indices alt: 0x3 super: 0x6 hyper: 0xffffffff meta: 0xffffffff numlock: 0x4 shift: 0x0 capslock: 0x1
[0,223] on_focus_change: window id: 0x1 focused: 1
[0,224] [glfw error 65544]: process_desktop_settings: failed with error: [org.freedesktop.DBus.Error.ServiceUnknown] The name is not activatable
[0,225] Got notification server capabilities: frozenset({'body-markup', 'actions', 'icon-static', 'body'})
[2,568] Press xkb_keycode: 0x20 clean_sym: ISO_Level5_Latch composed_sym: ISO_Level5_Latch mods: none glfw_key: 0 (UNKNOWN) xkb_key: 65042 (ISO_Level5_Latch) alternate_key: 111 (o)
[2,568] on_key_input: glfw key: 0x0 native_code: 0xfe12 action: PRESS mods: none text: '' state: 0 ignoring as keyboard mode does not support encoding this event
[2,623] Release xkb_keycode: 0x20 clean_sym: ISO_Level5_Latch mods: none glfw_key: 0 (UNKNOWN) xkb_key: 65042 (ISO_Level5_Latch) alternate_key: 111 (o)
[2,623] on_key_input: glfw key: 0x0 native_code: 0xfe12 action: RELEASE mods: none text: '' state: 0 ignoring release event for previous press that was handled as shortcut
[5,187] Press xkb_keycode: 0x19 clean_sym: c composed_sym: ccedilla active_unknown_mods: Mod3 consumed_unknown_mods: Mod3 text: ç mods: none glfw_key: 231 (ç) xkb_key: 231 (ccedilla) alternate_key: 119 (w�)
[5,188] on_key_input: glfw key: 0xe7 native_code: 0xe7 action: PRESS mods: none text: 'ç' state: 0 sent key as text to child (window_id: 1): ç
[5,250] Release xkb_keycode: 0x19 clean_sym: c mods: none glfw_key: 99 (c�) xkb_key: 99 (c) alternate_key: 119 (w�)
[5,250] on_key_input: glfw key: 0xe7 native_code: 0xe7 action: RELEASE mods: none text: '' state: 0 ignoring as keyboard mode does not support encoding this event
[6,731] Press xkb_keycode: 0x16 clean_sym: BackSpace composed_sym: BackSpace mods: none glfw_key: 57347 (BACKSPACE) xkb_key: 65288 (BackSpace)
[6,731] on_key_input: glfw key: 0xe003 native_code: 0xff08 action: PRESS mods: none text: '' state: 0 sent encoded key to child (window_id: 1): 0x7f 
[6,799] Release xkb_keycode: 0x16 clean_sym: BackSpace mods: none glfw_key: 57347 (BACKSPACE) xkb_key: 65288 (BackSpace)
[6,799] on_key_input: glfw key: 0xe003 native_code: 0xff08 action: RELEASE mods: none text: '' state: 0 ignoring as keyboard mode does not support encoding this event
[7,808] Press xkb_keycode: 0x25 clean_sym: Control_L composed_sym: Control_L mods: none glfw_key: 57442 (LEFT_CONTROL) xkb_key: 65507 (Control_L)
[7,809] on_key_input: glfw key: 0xe062 native_code: 0xffe3 action: PRESS mods: ctrl text: '' state: 0 ignoring as keyboard mode does not support encoding this event
[9,571] Press xkb_keycode: 0x1e clean_sym: m composed_sym: m mods: ctrl glfw_key: 109 (m�) xkb_key: 109 (m) alternate_key: 117 (u�)
[9,571] on_key_input: glfw key: 0x6d native_code: 0x6d action: PRESS mods: ctrl text: '' state: 0 sent encoded key to child (window_id: 1): 0xd 
[9,642] Release xkb_keycode: 0x1e clean_sym: m mods: ctrl glfw_key: 109 (m�) xkb_key: 109 (m) alternate_key: 117 (u�)
[9,642] on_key_input: glfw key: 0x6d native_code: 0x6d action: RELEASE mods: ctrl text: '' state: 0 ignoring as keyboard mode does not support encoding this event
[10,049] Press xkb_keycode: 0x1f clean_sym: d composed_sym: d mods: ctrl glfw_key: 100 (d�) xkb_key: 100 (d) alternate_key: 105 (i�)
[10,049] on_key_input: glfw key: 0x64 native_code: 0x64 action: PRESS mods: ctrl text: '' state: 0 sent encoded key to child (window_id: 1): 0x4 

On constate qu'Hyper n'apparait plus et que ISO_Level5_Latch est de retour ! Aussi, ç est correctement envoyée au terminal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants