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: master 3b41141708: Expose the name of an event's input device to Lisp Date: Sun, 10 Apr 2022 08:54:01 +0800 Message-ID: <87k0bxkbbq.fsf@yahoo.com> References: <164933858147.29834.15050766441005536059@vcs2.savannah.gnu.org> <83ee28az95.fsf@gnu.org> <87fsmow1hz.fsf@yahoo.com> <83a6cway59.fsf@gnu.org> <87tub4uivu.fsf@yahoo.com> <83y20fakwn.fsf@gnu.org> <87o81bu7zj.fsf@yahoo.com> <83v8vjai4s.fsf@gnu.org> <87bkxbsqfl.fsf@yahoo.com> <835yniah0u.fsf@gnu.org> <8735impqw4.fsf@yahoo.com> <83v8vi8uyu.fsf@gnu.org> <871qy6o9p3.fsf@yahoo.com> <83o81a8qnd.fsf@gnu.org> <87zgkulbuu.fsf@yahoo.com> <83ilri8iag.fsf@gnu.org> <87k0by43an.fsf@gnus.org> <838rse89vr.fsf@gnu.org> <87czhqb0l2.fsf@ditto.jhoto.spork.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="10057"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: Eli Zaretskii , Lars Ingebrigtsen , emacs-devel@gnu.org, monnier@iro.umontreal.ca, rms@gnu.org To: Brian Cully Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Apr 10 02:54:53 2022 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 1ndLqu-0002PW-Hs for ged-emacs-devel@m.gmane-mx.org; Sun, 10 Apr 2022 02:54:52 +0200 Original-Received: from localhost ([::1]:39560 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ndLqt-0007FX-8Y for ged-emacs-devel@m.gmane-mx.org; Sat, 09 Apr 2022 20:54:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36116) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ndLqJ-0006YO-Q6 for emacs-devel@gnu.org; Sat, 09 Apr 2022 20:54:16 -0400 Original-Received: from sonic308-10.consmr.mail.ne1.yahoo.com ([66.163.187.33]:40726) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ndLqH-0004eO-Bn for emacs-devel@gnu.org; Sat, 09 Apr 2022 20:54:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1649552051; bh=zjAdJQ7hbMK49Ma9YaTyJaCGp8Kdh9TWyWUuzK0uONo=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=VT2ZZm7mnC/6XeNGQPXeGNyqFUsabLc9Z4gQ8NDcASZROCAJtZc+aoe6F4e5/Ut+ptmDo5sU+QRx1Muf2LHv50Uvg5jlnCSwdA/MlcKoSmBxoFllKF/6gezUJxocLnK8bnosmwzl6BZ7Ox22yXoFjav/4YqKQLK0aAQSpgiVVEYucxSzWN6cL/uy9jGJp3rT/rwZlVQfb1S/1buDdceogu90kxuQoQQXEYwRE8eWAFFbwzQ2vOW57dIZ5g+IUOQcxiuzYPPRsDdLgylTuJQgC7ZUlFr8aaif4itQuv8xs8WU4Rc/PvqZIvLHMs3ELXvEvHRJMU0WZbHSbPnA6Qu+1Q== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048;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yzrrU5ATKmFeFk_V1toJKXWz._KLS0s5qm95J_eWIi_HB7lzgF4Bj2vfb PGB_KS4TFEhIA0pPMKYp157HYoioVwsn7j7nTb4elJAZyNNO_xFqXXe6YOYjXZ81PMewCXtdyfd6 17c8hvfbKFCUV0VcbOBWZX7oUd43EfY2zxLuRYkEkXfPGdbud8QEVf2oKSyrIEHvKEUS_kZKx9Lv aG3GjRwX7ZPiHMPphgBrpmSOwgHmRiV673hbXP9ng0 X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.ne1.yahoo.com with HTTP; Sun, 10 Apr 2022 00:54:11 +0000 Original-Received: by hermes--canary-production-sg3-65d7bd97b5-rvrjv (VZM Hermes SMTP Server) with ESMTPA ID b2a765edeeb387d50c4bcdac62c1a86d; Sun, 10 Apr 2022 00:54:07 +0000 (UTC) In-Reply-To: <87czhqb0l2.fsf@ditto.jhoto.spork.org> (Brian Cully's message of "Sat, 09 Apr 2022 13:52:52 -0400") X-Mailer: WebService/1.1.20048 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.187.33; envelope-from=luangruo@yahoo.com; helo=sonic308-10.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, T_SCC_BODY_TEXT_LINE=-0.01 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" Xref: news.gmane.io gmane.emacs.devel:288075 Archived-At: Brian Cully writes: > I may have missed this earlier in the thread, but where would > these mappings of device identifier (name, USB VID:PID, whatever) to > device classes come from? How would that work for devices that can be > made to look like a *lot* of different input types? We look at the device name provided by the X input extension. It is not calculated based on any USB identifiers. > I=E2=80=99ve got a Steam Controller I can set up as a joystick, keyboard > (HID report and boot protocols), relative and absolute mouse, all at the > same time, and I can swap its functions on the fly. I=E2=80=99ve got a mo= use > that can send both =E2=80=9Cpixel=E2=80=9D scroll events as well as norma= l line-based > ones depending on how it=E2=80=99s configured. I have a programmable keyb= oard > that I can make look like any USB device I want. That can be identified by the kind of event it is currently sending. When it sends "smooth" scroll events, Emacs gets a wheel event with the right valuators. When it sends line-based scroll events, Emacs gets one without. If it's configured as a relative mouse, Emacs will get mouse movement events; as an absolute mouse, touch events (I think). > Is Emacs going to be responsible for mapping thousands of device > identifiers to device classes (which may change at runtime?) I just > don=E2=80=99t understand what this looks like from a user=E2=80=99s persp= ective. The input driver is responsible to name the devices and to set the appropriate properties. Otherwise the devices will not work correctly with any other program either.