From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 21664 invoked from network); 7 Oct 2022 13:33:18 -0000 Received: from 9front.inri.net (168.235.81.73) by inbox.vuxu.org with ESMTPUTF8; 7 Oct 2022 13:33:18 -0000 Received: from mail.posixcafe.org ([45.76.19.58]) by 9front; Fri Oct 7 09:31:47 -0400 2022 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=posixcafe.org; s=20200506; t=1665149569; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GFdlmQcwWLN4Eo/hGgTcway+anxGu4X0Wzcl6I9ESy0=; b=A/Pni0nMGPaQSRxjd/XB95DFgWsVfS/RJ9g0WQHSHfXQNCw6w1I1nASO86utB7tHhaBC0K 3peHRTfJFZjfnywVEVa39kirTV/f3infExj3KerIcaNrAiWBMAeSlP2o200sc/nm1g1RiG W8ak4H/YmbfR3gRRvzD7FMrW2DopzKg= Received: from [192.168.168.200] (161-97-228-135.mynextlight.net [161.97.228.135]) by mail.posixcafe.org (OpenSMTPD) with ESMTPSA id 97efcf7a (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for <9front@9front.org>; Fri, 7 Oct 2022 08:32:49 -0500 (CDT) Message-ID: <0abf9b96-35dc-b490-1ede-4ae87ff36a62@posixcafe.org> Date: Fri, 7 Oct 2022 07:31:41 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Content-Language: en-US To: 9front@9front.org From: Jacob Moody Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: mobile immutable blockchain property browser Subject: [9front] [PATCH] allow kbdfs to rewrite altgr combinations from drawterm Reply-To: 9front@9front.org Precedence: bulk Currently most drawterm guis simply map right alt to to left alt. This is fine, but we do have support for making use of altgr so why not send that? Once we are sending altgr, this tweaks how kbdfs ingests those 'R/r' messages and allows it to switch over in to the altgr page on matching runes. This only effects the processing for /dev/kbd messages _in to_ kbdfs which is seemingly only used by drawterm. This also captures when the algr combination may have been precomposed by the host running drawterm, and sets k.b correctly. diff 59d978eeb6d9f987d2c2b17d2799f3c15655284f uncommitted --- a/sys/src/cmd/aux/kbdfs/kbdfs.c +++ b/sys/src/cmd/aux/kbdfs/kbdfs.c @@ -514,12 +514,14 @@ k.b = 0; k.down = (p[0] == 'r'); for(i=0; i= 16 && kbtabctl[i] == k.r)){ + if(kbtab[i] == k.r || kbtabshift[i] == k.r || (i >= 16 && kbtabctl[i] == k.r) || kbtabaltgr[i] == k.r){ /* assign button from kbtab */ k.b = kbtab[i]; /* handle ^X forms */ if(k.r == kbtab[i] && kbtabctl[i] && !a->shift && !a->altgr && a->ctl) k.r = kbtabctl[i]; + else if(k.r == kbtab[i] && kbtabaltgr[i] && !a->shift && a->altgr && !a->ctl) + k.r = kbtabaltgr[i]; break; } }