From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: Regarding on-key-up event Date: Sat, 04 Feb 2023 08:18:54 +0800 Message-ID: References: <83edr6vcia.fsf@gnu.org> <83cz6qv8qs.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4899"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org, Konstantin Kharlamov , Eli Zaretskii , Ag Ibragimov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Feb 04 01:20:17 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pO6Hx-000179-6o for ged-emacs-devel@m.gmane-mx.org; Sat, 04 Feb 2023 01:20:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pO6H3-0002JF-VY; Fri, 03 Feb 2023 19:19:22 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pO6H2-0002J0-Ok for emacs-devel@gnu.org; Fri, 03 Feb 2023 19:19:20 -0500 Original-Received: from sonic317-33.consmr.mail.ne1.yahoo.com ([66.163.184.44]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pO6Gx-00086H-32 for emacs-devel@gnu.org; Fri, 03 Feb 2023 19:19:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1675469952; bh=tjz8+V2XK8yfXrgORDPhwkBBtjDgVC6LuvHwqy50ZU8=; h=Date:From:To:Subject:In-Reply-To:References:From:Subject:Reply-To; b=D2Goykx8UiIg/kfrQ8OR1rlCu8U2NdmcVPrrVu9KAExwow3YxpCtK8cYom+dpUpm2aotHwLvx8Pw2LIvrjLevDjgPFWq/5zrVPI/meetbrAJHlMvIpiOBKDs9KQY2PPMAugdCCDcX8AxhwXJw/ArK/SpQDDPtL5w+ue83Hux20z+yNkWh16n6NpJX0L0ZN5sj0XA6jKPx1kYeYt6UwCoubo6WkQrwwTErtwuaEbKqsY/c3Ue8ZmkvReo6Ohwr4C1vgsPNWitiVGx1+jBX/gsaunW1H80oQjRRoO7xBUiSMOKJg30/yuVPYbO5RCOOgyZSY1+Q3gJBH2km/htrv0oNQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1675469952; bh=P5jK4EvZXkY7BCQK6JmlTXVa+7YDh7DgT2200aZgu9z=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=LE9dvn9Rh45kbik5Sgj4zRn77BHtwQWiGvvFLFI2AV5WGktzDiIj3w4kAEc18psQQRwQuJ9eP3k9cxK7mNA/COV75HHsQ8pRKFTcwSh0Uel5KzblHQHV996JdErH5HSCFy4V81+Ue+ZA8uIJEA+IF38bgsR6uqN6ja9+l8KzWoqc9PRGEsUYq/931lgWeQyCd8ugAJ5+AQ579p0ypNjPE1knUT8J6fRHQ4dKh0rtKkY9QeuyJ16LzhJghgWgDYJY7+OFX4kjJ6RySpya45/DqXyKUZUXvSEnoafbGKpyYs7GAf0z49K4+EgL79O7lqVlYO0EIhRp6pxD4sTyVEWgvw== X-YMail-OSG: 7s3geDkVM1lZaItgUtM8sE0fi.4tGpFxk_mH3OyQurpTIKYisI3FutnVTL4Jvm6 wzriZEjqeYohJ_vu5UV0nxELXdZ6HJRnt5iyQyc1ElNqSyjxEc0JZ9Uw1023zSdPnokWx8RfJNN0 PMHNGGad1NbPNFUoL0ksGLYj.bUmyXKJXHP05V8ymlT1qGjHs0DlzY.FoGwYSMvLLVgA0iG5DsOs 3ai9oqOhpZ3hRUeWMyBTAHP06pQlHYdnMu3VvDDDooSpImd8KtemtOaSTocPCVL3ZD0yt.XxMUBV VDTlavBE6FfeCNUrpEq8.C_FNGzAdaN9PGGYCME6Exzj2eH30xm7qMDZdaIXajEsDp.aQYmNnEw5 n7eCSTMPv4gc0CSP1kLltebhgH2LamzIATDCzjMCEQpMz4unDHV24NkJVCvisuUTHrgyhkC12pqF ZrE_AgN1GapWYUmQ5wQwW4MvYfDtlFSgqXxokK14L026Fp2dla5ZbxnP2tRiBZQLn0SwHYnFzoD0 nDFY0Hgmvw51s2bFElMoeC8PMH_ZrXTFR3hxTLY8fxKkzdjHleg_mDCeq8kME1NgKpVKr6Q7.zzp AIR9eyCzbWD3zDi15qyxj97Z3QLJ4OMdiWE8dCfm0HHoR64928afE5bOt0RvV6F4guNt.JnsZkpk gDe068XSM39M.IqmoTGHdhsHhzEpNCLG3e5tGkwD_C7unBcF5.UbJT.vdBtldhHZGfRTSb9FRMDv SNJIJuxW5iIac8UYNZYqun_XrPUzs24roVwvTrRlgeGAiEUB5B6hdMy7.h5dCtxylvZxseg4pB7p 2ms3.cSFhXJL5FEoFfpP46NK8VbI3D2iWZzqEcqHq. X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.ne1.yahoo.com with HTTP; Sat, 4 Feb 2023 00:19:12 +0000 Original-Received: by hermes--production-sg3-9fc5746c8-pz6sb (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID fc5210c6964fa5a17fc99746a7a93a32; Sat, 04 Feb 2023 00:19:08 +0000 (UTC) In-Reply-To: X-Mailer: WebService/1.1.21161 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.184.44; envelope-from=luangruo@yahoo.com; helo=sonic317-33.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:302943 Archived-At: This nice behavior may be guaranteed by a keyboard itself, but not by input= methods, where it is actually impossible to match up an input method's com= mitted key events with a corresponding key release event=2E Of course, since the input method is not operating synchronously wrt the X= connection, there is not even the guarantee that the key release arrives a= fter the key press, since the latter are not filtered through it=2E And fo= r good reason; imagine that the input method commits a string, abcdef, and = Emacs generates one key event for each character=2E Which key release events should Emacs then deliver? On February 4, 2023 5:47:14 AM GMT+08:00, Konstantin Kharlamov wrote: >On Fri, 2023-02-03 at 21:39 +0200, Eli Zaretskii wrote: >>=20 >> While you hold a key, a typical keyboard auto-repeats, so I see no >> problem here=2E > >I am not aware of any keyboard that repeats its events upon holding a key= =2E >Repetition is usually implemented in a toolkit handling key events=2E A k= eyboard >typically sends a single "pressed" event, and then after you done holding= a key >it sends a "released" event=2E > >Here's a proof: I run `libinput debug-events --verbose`, then hold `j`: > > $ libinput debug-events --verbose > [=E2=80=A6] > -event6 KEYBOARD_KEY +0=2E000s *** (-1) pressed > jjjjjjjjjjjjjjjjjj event6 KEYBOARD_KEY +1=2E280s ***= (-1) >released > [=E2=80=A6] > >See, there are repeating `j` on the screen, but it's created by the Qt to= olkit >of my Konsole terminal=2E Keyboard sent only 2 events: `pressed` and `rel= eased`=2E >