From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Peter Feigl" Newsgroups: gmane.emacs.devel Subject: Re: Physical keyboard events Date: Tue, 29 Oct 2024 16:38:49 +0100 Message-ID: <87msimhqba.fsf@nexoid.at> References: <86r07z58or.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24473"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Cecilio Pardo , Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 29 17:33:21 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 1t5p9k-00068A-Rl for ged-emacs-devel@m.gmane-mx.org; Tue, 29 Oct 2024 17:33:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5p96-0001hr-35; Tue, 29 Oct 2024 12:32:40 -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 1t5oJB-0000rQ-Gb for emacs-devel@gnu.org; Tue, 29 Oct 2024 11:39:01 -0400 Original-Received: from mail.nexoid.at ([142.132.236.30]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5oJ9-0002qG-Q9; Tue, 29 Oct 2024 11:39:01 -0400 Original-Received: from mail.nxd.at (unknown [10.17.30.25]) by mail.nexoid.at (Postfix) with ESMTP id DEAC54A0052; Tue, 29 Oct 2024 15:39:09 +0000 (UTC) Original-Received: from h4nex (cm56-163-23.liwest.at [86.56.163.23]) by mail.nxd.at (Postfix) with ESMTPSA id B38F6152BC4; Tue, 29 Oct 2024 15:38:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nexoid.at; s=cuprum; t=1730216330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=p/RZCLqNmwVFY68mLhEsFt5BnSPlhB36GSL+BkJB7Gs=; b=L64HRsPOGHW13mA9aI/bpfBEBs0BXEZFAyx+FvQM1oxqylqjVW/NRmS45Ubv+10HEIUKS5 ayW9E8h4gtvW8JT+GPVh/BZmR93HgN/8HzGxZFkdHTHjGh60/SOA/qOmEF7NZhLEHrql0d fL6Tx2WUIizPh9IKVMIofmkfuYNRzV241JkyG9NPee7HhyS6qA9efHiEZle3edC/k9mUUx 2nPfsSvS3plJRlNZbo1wJtfTH0Z7GcyhVsVTfnvUXyx+juXE+hcsOtrI7Sx1QZYLprf61/ SbBAdzmzUYKAuTfD1euCBYv/cIA50gevEmInT5OS5pgEEHgCyk62lyE2jE12zA== In-Reply-To: Received-SPF: pass client-ip=142.132.236.30; envelope-from=peter.feigl@nexoid.at; helo=mail.nexoid.at 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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 29 Oct 2024 12:32:28 -0400 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:324923 Archived-At: > I will define a list of keys: LeftShit, RightShift, LeftControl, etc. > The platform dependent code will decide which one was pressed. As events > will be invisible, I don't think we will interfere with input methods. I caution you to think about this very well, there are *very* many non-standard keyboards or remapped keyboards out there, where users expect everything to work. In general, it is best to leave the mapping of physical keys to intended keypresses to whatever the operating system provides. In the specific case of Xorg, please only look at the keysyms, do not try to do anything magical with the scancodes, this will only result in a broken implementation. I understand the wish to have this, but it is a way more complex topic than it looks like from a first glance. I have had to deal with way too many bad implementations of this than wanting to deal with it in Emacs as well :-/ Sorry for the criticism, in case you have already thought about all of this and solved it, I'd really be interested in hearing more about it! Greetings, Peter