From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <9front-bounces@9front.inri.net> X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: from 9front.inri.net (9front.inri.net [168.235.81.73]) by inbox.vuxu.org (Postfix) with ESMTP id 98DCD22159 for ; Sun, 30 Jun 2024 18:40:53 +0200 (CEST) Received: from mail-pj1-f52.google.com ([209.85.216.52]) by 9front; Sun Jun 30 12:39:52 -0400 2024 Received: by mail-pj1-f52.google.com with SMTP id 98e67ed59e1d1-2c7e2382b94so433533a91.3 for <9front@9front.org>; Sun, 30 Jun 2024 09:39:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719765590; x=1720370390; darn=9front.org; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=fkJ5fY8eITeqBMvbi1hUx6qiQwCFDKdjsBNKc4VPKkI=; b=P0bIjFNaDCPvjc0WyuY3baUEdsEI11NrBe/eQr16Rg6TvD/C7EuBnJxWqVLIcpIe4Q 2iLrovcfKaYa+4XuxQ8O2GCx87pQZQ6SEe/IPtYLPcv2QPE1YeDCqQcCKSMt9KUfNK+V M9UaSaXi4zitND6Ue6je9upMD4hjl5c0r4c/Vw1D37F+9Ji5pRkLNg5qaL3ZsSCJmvAc 3Mf9GHl5ZuQiC0P0m0uaLwh1XmxafRIiOZxxt45F6r1XpAVxCvTHVXXtfSs5z3GEM1oi NaX+wao3fq3faHjmdzf+7LBIVQi02IlSADR5rU7umH1FTxEw+nX41nu9ju9KLSjSj4bD xy/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719765590; x=1720370390; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fkJ5fY8eITeqBMvbi1hUx6qiQwCFDKdjsBNKc4VPKkI=; b=leM2R8iDzbemaw+zplnC6aWb9d8MQ68KReoW7L+9YUFIh4c56WXQQlq/k/lvVmNqXG wsZ5R+hjj+mSQ0Ky+iZ24JxtefkGCqAUSzM57i7msyYFqZNt+PRue8e/fIU4QWMiZs2q UBtjbHWuVRY/a0S+WHbO8HxAPjvTZiQ77o35UdsMCJfgpHJqTcvZl1khsk1dZkl7c3N6 T1Sz4kjBxBKfl8T0+pmyPyobSjlyYwmnd4/vNG9wMdKg+VqAwHXz94LbXFLD2dD3DUR8 PQUZgBL8S/m70go9/L3c1kthb6CRWPKWtuiOHGNVluZvzkwC+LyeJnNPvzPkeidYiRug hayA== X-Gm-Message-State: AOJu0YzBVumLaxtgSUTaacp9KitZe9fI7LQ7zejuiNUWNtpO4iOMMyKk KuISmebHOjNjNx8kGFUepjBK6qqtLFMY26uXU7ieTNBGPBKuEi3ln9Z8/S3cTmuZBdUz9S0lJ+R DRkt+n4+FZSc73SiN7vkDPFM1or0TRw== X-Google-Smtp-Source: AGHT+IE28ZomgmjqNtXMdKPRyP/TZOZsw+YsGvkQDwCbGPnERDpJyqpAO0EMRYPSbcJ7txLIe+VA3oeWvwY0hZQQnCc= X-Received: by 2002:a17:90a:9b09:b0:2c2:d11b:14dd with SMTP id 98e67ed59e1d1-2c93d5de42amr4071057a91.0.1719765589966; Sun, 30 Jun 2024 09:39:49 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: hiro <23hiro@gmail.com> Date: Sun, 30 Jun 2024 18:39:38 +0200 Message-ID: To: 9front@9front.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: virtual HTTP over AJAX information dependency framework Subject: Re: [9front] [PATCH] Fix shift release events in X11 drawterm with shift:both_capslock xmodmap option Reply-To: 9front@9front.org Precedence: bulk this does seem like your xmodmap is causing a bug in x11. the behavior is completely non-sensical. maybe nobody ever tested this x11 feature? ;) not sure how much we should care about workarounds for bugs that only happen in an edge-case of a (mis-?)configuration. otoh a few well commented lines that contain a good justification for this braindamage, which now exists after such deep analysis wouldn't bother me personally... even if it's just a link to this thread. On Sat, Jun 29, 2024 at 7:19=E2=80=AFPM Timothy Robert Bednarzyk wrote: > > > what exactly are you receiving from x11 when you "enable" your > > double-shift-caps-lock? > > > > 1. shiftdown_left 2. shiftdown_right 3. capslockdown 4. shiftup_left > > 5. shiftup_right 6. capslocksup ? > > which of these are visible, or are they in a different order? e.g. i > > can easily imagine something like 123645 > > Below, to the left of each colon represents what I am physically doing > and to the right represents the events that occur in X11. On the left, I > will use PL/PR for me pressing the left/right shift keys and RL/RR for > releasing the left/right shift keys. On the right, I will use your > numbers. > > PL, RL: 1, 6. > > PR, RR: 2, 6. > > PL, PR, RL, RR: 1, 3, 6, 5. > > PL, PR, RR, RL: 1, 3, 6, 6. > > PR, PL, RL, RR: 2, 3, 6, 6. > > PR, PL, RR, RL: 2, 3, 6, 4. > > Interestingly, if I press one shift key, then the other, release the > first shift key, and then release the second one, I do actually get the > release event for the second shift key. I also don't get a press event > for that second shift key, but that makes sense to me since pressing the > second shift key is supposed to be interpreted as pressing caps lock > anyways. Perhaps most interesting to me though is that if I instead > release the second shift key before the first one I get two events for > releasing the caps lock in a row and zero events for releasing shift > keys. > > While the press/release events work strangely with xmodmap's > shift:both_capslock option, the modifier masks do behave normally and I > believe that is why I have never noticed a problem in any other program > in the ~2/3 of a year that I've been using it (and why I wasn't stuck > typing in all caps through drawterm despite the mouse buttons staying > swapped). Perhaps a more robust solution to the problem would be to > probe the current state of the modifiers when handling things such as > mouse button presses rather than to rely on press/release events, but I > don't know nearly enough to know how difficult or feasible doing that > would be. > > -- > trb