From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Physical keyboard events Date: Tue, 29 Oct 2024 15:40:20 +0200 Message-ID: <86r07z58or.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30127"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Cecilio Pardo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 29 14:41:14 2024 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 1t5mTA-0007fX-Eo for ged-emacs-devel@m.gmane-mx.org; Tue, 29 Oct 2024 14:41:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5mST-0005EM-6d; Tue, 29 Oct 2024 09:40:29 -0400 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 1t5mSQ-0005Dv-2u for emacs-devel@gnu.org; Tue, 29 Oct 2024 09:40:26 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5mSP-0001er-GI; Tue, 29 Oct 2024 09:40:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=1po27trtSjrr2Elhm6xjx+o7bYmYUAwQlO3u92b1CaM=; b=SEa1pxIOCgL2 nrAHDmS+b+epwsJKF2u2ZQBQcgvNbTvYt8O1/RmOT9yPR0z8Z0hMjVrvkHkOU40xr5tPwgUeoOZeh qPIxcqnoq/JeczNhxNuIehWQRE19SX22W/JtAglH70bJpVUOQ65MzLnCiowbx2KxPJE7KjxWv+j3p ACM+nHyOuhp+G9MT/bBesMa8lk0itYZvEIGYXhz7CFMcQmXzHSDy6chK9TVD5uEBwPuGlMJFwRX5J //KQ0ebFtUzgPAamIpGik6ur1k2gpO11XxxZArnHRI5Xpp4Nnh2ou5piDd2+a9VRd2wDo8Zv2+6Rp 00GYsvCV/5ps2QU8An8Kfw==; In-Reply-To: (message from Cecilio Pardo on Tue, 29 Oct 2024 00:15:22 +0100) 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:324911 Archived-At: > Date: Tue, 29 Oct 2024 00:15:22 +0100 > From: Cecilio Pardo > > Hello, > > I'm planning to implement physical key press/release events for emacs. > I would add a new element to 'enum event_kind', that in turn would > send a new input event. This input event will be bound in > 'special-event-map' so that it will not modify the normal flow of > keyboard input. Platform dependent code would send these events > on key press and release. I hope these new events will not be sent at all times, only when some optional variable is set (similar to track-mouse, perhaps). I wouldn't want Emacs to start processing press/release events on Shift or Ctrl unless a Lisp program needs that, and I don't think we want to change our processing of keyboard such that instead of a single keypress with modifiers we need to process multiple key-press and key-release events when the user simply types on the keyboard. Physical keys also raise the issue of supporting input methods, keyboard layout switches, etc. > Then a lisp fuction can be bound to this on the special-event-map, to > implement the detection of: > > - double/triple tap on Shift, Control, Alt, etc > - Long presses on Shift, Control, Alt, etc. > > This actions could be bound to commands, or could add a modififer > (Super, Hyper) to next commands. > > And make Tetris independent of the keyboard repeat rate :) > > Has something like this been discussed before, so I can check? No, I don't think so, although we get feature requests for something like that from time to time. However, on what systems and which Emacs configurations will it be possible to provide such a feature? Thanks.