From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f51.google.com ([209.85.167.51]) by ewsd; Sat Apr 11 13:27:33 EDT 2020 Received: by mail-lf1-f51.google.com with SMTP id l11so3518098lfc.5 for <9front@9front.org>; Sat, 11 Apr 2020 10:27:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition; bh=MqfSb1+jPqw3r99QnNR3igQX6kB8tzfwbJuaAQpn+68=; b=nhBeAkJ1f0LKqx4byMAF48e9QPhMbhTM/mcyOoxpzyovNHLLbzjVw59dOe9s3se0uV gpVzKQwgxVggUlGNu7XQkHWVC81NA5PRjMv6UzKEwSuPHqqcHNNLudGDktgjP1nuaMCD sRRkqdU04n8xQMqRkqiG6CklrpU/7bJiBqf4iHKDPAVFZ25E6daH2kuCmcOxqe6bLtVR 1+GL7asiioHyKXmufOQtN/itBzkU0y1lTvtx8HzbodbnLZgN2SjKsRFwukbOUCBfln1E vZKVK5uSz/Tnhzz9G81W9uQZdGbDtBbdfSGL2d3p8p5reLa1GaemU+6bnG5Qiqk+8aRh sFSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition; bh=MqfSb1+jPqw3r99QnNR3igQX6kB8tzfwbJuaAQpn+68=; b=qxKbSESXmmbpUV/IqX1tfoatYqD3kFcLCnE2afhHHu6vLLVMwJZ4GbK8Ptm3dyxe0O 5JupJyvtrcpUpM0lXVb9Mf++aWow/NtHgQm8qms54Jg6j43K5y2714TsmdoOYswJFvZS yooJnmhwvu8oBbOyzqzWvS7Rzx6EBSEyVWNTun6IPGtIX51q7d/lIipeNLarNNMVMxLk 3ZBceS+dxAlSfy8eXLMpSzUZut5R2AWSDEIfF4PG3QXN1KK4SN+Npy0MJWvzT6vIBH9Y 9obXzZKDEhWcQBfx7mkf6RVkUJHc0lYNRNctITugqX9AZ4as5BKxwqQaqRp+2IKuPc4f ZbWQ== X-Gm-Message-State: AGi0PuZDk6YRQ5i2mixch9NBR9r1SAkQ3FCbhvlt+UXIIVArXJuFztmm L5E7VBfciULgBxsxZOLaKUlMZzmqkzA= X-Google-Smtp-Source: APiQypIWrc34tXB3nKECDgnrKPL9qvMReQ2k0YtYjmI3cHeyZ+Iw1e3zSZUm5zjGfWIgV5FswE/hqg== X-Received: by 2002:a19:4014:: with SMTP id n20mr5603748lfa.6.1586626046841; Sat, 11 Apr 2020 10:27:26 -0700 (PDT) Return-Path: Received: from fukken.whatever (c-41cbe555.027-406-73746f39.bbcust.telenor.se. [85.229.203.65]) by smtp.gmail.com with ESMTPSA id d21sm3732660ljc.49.2020.04.11.10.27.25 for <9front@9front.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Apr 2020 10:27:25 -0700 (PDT) Date: Sat, 11 Apr 2020 19:27:24 +0200 From: Sigrid Solveig =?iso-8859-1?Q?Hafl=EDnud=F3ttir?= To: 9front@9front.org Subject: kbdfs: "glenda" key modifier Message-ID: <20200411172724.GB51717@fukken.whatever> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="q1uHkkYkRKkr+TO1" Content-Disposition: inline List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: patented non-blocking scripting API engine-oriented rich-client control --q1uHkkYkRKkr+TO1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I added support for "glenda" key (the one that usually has Windows logo) support to kbdfs as an additional modifier to be used by whoever needs it. I use it with https://github.com/ftrvxmtrx/riow to get window management shortcuts although I plan to make riow depend solely on kbdfs change alone without having any rio mods by having a "filter" on top of kbdfs to intercept this modifier. If there is not much objection I would like to merge this change alone to 9front. Comments and ideas are welcome. --q1uHkkYkRKkr+TO1 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: attachment; filename="kbdfs-glenda.patch" Content-Transfer-Encoding: quoted-printable diff -r 9d154a594d99 sys/include/keyboard.h --- a/sys/include/keyboard.h Sat Apr 11 14:20:41 2020 +0200 +++ b/sys/include/keyboard.h Sat Apr 11 18:50:50 2020 +0200 @@ -44,6 +44,8 @@ Kscrolloneup=3D KF|0x20, Kscrollonedown=3D KF|0x21, =20 + Kglenda=3D KF|0x22, + Ksoh=3D 0x01, Kstx=3D 0x02, Ketx=3D 0x03, diff -r 9d154a594d99 sys/lib/kbmap/fi --- a/sys/lib/kbmap/fi Sat Apr 11 14:20:41 2020 +0200 +++ b/sys/lib/kbmap/fi Sat Apr 11 18:50:50 2020 +0200 @@ -32,6 +32,8 @@ 1 52 ': 1 53 '_ 1 86 '> +2 91 0xf022 +2 125 0xf022 3 3 '@ 3 4 '=A3 3 5 '$ @@ -44,3 +46,5 @@ 3 27 '~ 3 46 '=A2 3 86 '| +3 91 0xf022 +4 91 0xf022 diff -r 9d154a594d99 sys/lib/kbmap/us --- a/sys/lib/kbmap/us Sat Apr 11 14:20:41 2020 +0200 +++ b/sys/lib/kbmap/us Sat Apr 11 18:50:50 2020 +0200 @@ -345,7 +345,7 @@ 2 88 0 2 89 0 2 90 0 -2 91 0 +2 91 0xf022 2 92 0 2 93 0 2 94 0 @@ -379,7 +379,7 @@ 2 122 0 2 123 0 2 124 0 -2 125 0 +2 125 0xf022 2 126 0 2 127 0 3 0 0 @@ -473,7 +473,7 @@ 3 88 0 3 89 0 3 90 0 -3 91 0 +3 91 0xf022 3 92 0 3 93 0 3 94 0 @@ -601,7 +601,7 @@ 4 88 ^L 4 89 0 4 90 0 -4 91 0 +4 91 0xf022 4 92 0 4 93 0 4 94 0 diff -r 9d154a594d99 sys/src/cmd/aux/kbdfs/kbdfs.c --- a/sys/src/cmd/aux/kbdfs/kbdfs.c Sat Apr 11 14:20:41 2020 +0200 +++ b/sys/src/cmd/aux/kbdfs/kbdfs.c Sat Apr 11 18:50:50 2020 +0200 @@ -42,6 +42,7 @@ int ctl; int alt; int altgr; + int glenda; int leds; }; =20 @@ -178,11 +179,11 @@ [0x40] 0, 0, 0, 0, 0, 0, Kbreak, Khome, [0x48] Kup, Kpgup, 0, Kleft, 0, Kright, 0, Kend, [0x50] Kdown, Kpgdown,Kins, Kdel, 0, 0, 0, 0, -[0x58] 0, 0, 0, 0, 0, 0, 0, 0, +[0x58] 0, 0, 0, Kglenda, 0, 0, 0, 0, [0x60] 0, 0, 0, 0, 0, 0, 0, 0, [0x68] 0, 0, 0, 0, 0, 0, 0, 0, [0x70] 0, 0, 0, 0, 0, 0, 0, 0, -[0x78] 0, Kup, 0, 0, 0, 0, 0, 0, +[0x78] 0, Kup, 0, 0, 0, Kglenda, 0, 0, }; =20 Rune kbtabshiftesc1[Nscan] =3D @@ -198,11 +199,11 @@ [0x40] 0, 0, 0, 0, 0, 0, 0, 0, [0x48] Kup, 0, 0, 0, 0, 0, 0, 0, [0x50] 0, 0, 0, 0, 0, 0, 0, 0, -[0x58] 0, 0, 0, 0, 0, 0, 0, 0, +[0x58] 0, 0, 0, Kglenda, 0, 0, 0, 0, [0x60] 0, 0, 0, 0, 0, 0, 0, 0, [0x68] 0, 0, 0, 0, 0, 0, 0, 0, [0x70] 0, 0, 0, 0, 0, 0, 0, 0, -[0x78] 0, Kup, 0, 0, 0, 0, 0, 0, +[0x78] 0, Kup, 0, 0, 0, Kglenda, 0, 0, }; =20 Rune kbtabctrlesc1[Nscan] =3D @@ -218,11 +219,11 @@ [0x40] 0, 0, 0, 0, 0, 0, 0, 0, [0x48] Kup, 0, 0, 0, 0, 0, 0, 0, [0x50] 0, 0, 0, 0, 0, 0, 0, 0, -[0x58] 0, 0, 0, 0, 0, 0, 0, 0, +[0x58] 0, 0, 0, Kglenda, 0, 0, 0, 0, [0x60] 0, 0, 0, 0, 0, 0, 0, 0, [0x68] 0, 0, 0, 0, 0, 0, 0, 0, [0x70] 0, 0, 0, 0, 0, 0, 0, 0, -[0x78] 0, Kup, 0, 0, 0, 0, 0, 0, +[0x78] 0, Kup, 0, 0, 0, Kglenda, 0, 0, }; =20 Rune kbtabaltgr[Nscan] =3D @@ -238,11 +239,11 @@ [0x40] 0, 0, 0, 0, 0, 0, Kbreak, Khome, [0x48] Kup, Kpgup, 0, Kleft, 0, Kright, 0, Kend, [0x50] Kdown, Kpgdown,Kins, Kdel, 0, 0, 0, 0, -[0x58] 0, 0, 0, 0, 0, 0, 0, 0, +[0x58] 0, 0, 0, Kglenda, 0, 0, 0, 0, [0x60] 0, 0, 0, 0, 0, 0, 0, 0, [0x68] 0, 0, 0, 0, 0, 0, 0, 0, [0x70] 0, 0, 0, 0, 0, 0, 0, 0, -[0x78] 0, Kup, 0, 0, 0, 0, 0, 0, +[0x78] 0, Kup, 0, 0, 0, Kglenda, 0, 0, }; =20 Rune kbtabctl[Nscan] =3D @@ -258,11 +259,11 @@ [0x40] '=06', '=07', '=0C', '=0D', '=0E', '=05', '=06', '=17',=20 [0x48] '=18', '=19', '=0D', '=14', '=15', '=16', '=0B', '=11',=20 [0x50] '=12', '=13', '=10', '=0E', 0, 0, 0, '=0F',=20 -[0x58] '=0C', 0, 0, 0, 0, 0, 0, 0, +[0x58] '=0C', 0, 0, Kglenda, 0, 0, 0, 0, [0x60] 0, 0, 0, 0, 0, 0, 0, 0, [0x68] 0, 0, 0, 0, 0, 0, 0, 0, [0x70] 0, 0, 0, 0, 0, 0, 0, 0, -[0x78] 0, '=07', 0, '\b', 0, 0, 0, 0, +[0x78] 0, '=07', 0, '\b', 0, Kglenda, 0, 0, }; =20 Rune kbtabshiftaltgr[Nscan] =3D @@ -344,7 +345,7 @@ if(scan->esc2){ scan->esc2--; return; - } else if(c =3D=3D 0xe1 || c =3D=3D 0xe2){ + } else if(c =3D=3D 0xe1 || c =3D=3D 0xe2 || c =3D=3D 0xe3){ scan->esc2 =3D 2; return; } else if(c =3D=3D 0xe0){ @@ -412,6 +413,9 @@ case Kcaps: scan->caps ^=3D key.down; break; + case Kglenda: + scan->glenda ^=3D key.down; + break; } scan->esc1 =3D 0; } @@ -464,7 +468,7 @@ } } /* button unknown to kbtab, use rune if no modifier keys are active */ - if(k.b =3D=3D 0 && !a->shift && !a->altgr && !a->ctl) + if(k.b =3D=3D 0 && !a->shift && !a->altgr && !a->ctl && !a->glenda) k.b =3D k.r; if(k.r =3D=3D Kshift) a->shift =3D k.down; @@ -472,6 +476,8 @@ a->altgr =3D k.down; else if(k.r =3D=3D Kctl) a->ctl =3D k.down; + else if(k.r =3D=3D Kglenda) + a->glenda =3D k.down; send(keychan, &k); break; =20 @@ -664,6 +670,7 @@ case Knum: case Kshift: case Kaltgr: + case Kglenda: /* ignore modifiers */ continue; =20 --q1uHkkYkRKkr+TO1--