From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Wiegley Newsgroups: gmane.emacs.bugs Subject: bug#22163: Feature request: Add support for key release event Date: Tue, 15 Dec 2015 12:27:08 -0800 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1450211307 24428 80.91.229.3 (15 Dec 2015 20:28:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 15 Dec 2015 20:28:27 +0000 (UTC) Cc: 22163@debbugs.gnu.org To: Simon Friis Vindum Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 15 21:28:14 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a8wCh-0006YU-27 for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Dec 2015 21:28:11 +0100 Original-Received: from localhost ([::1]:39036 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8wCg-00057E-8Y for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Dec 2015 15:28:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59464) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8wCb-00056s-Rb for bug-gnu-emacs@gnu.org; Tue, 15 Dec 2015 15:28:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a8wCY-0003aR-Ky for bug-gnu-emacs@gnu.org; Tue, 15 Dec 2015 15:28:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45354) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8wCY-0003aM-GO for bug-gnu-emacs@gnu.org; Tue, 15 Dec 2015 15:28:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1a8wCY-0003z8-6n for bug-gnu-emacs@gnu.org; Tue, 15 Dec 2015 15:28:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: John Wiegley Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Dec 2015 20:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22163 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22163-submit@debbugs.gnu.org id=B22163.145021124115271 (code B ref 22163); Tue, 15 Dec 2015 20:28:02 +0000 Original-Received: (at 22163) by debbugs.gnu.org; 15 Dec 2015 20:27:21 +0000 Original-Received: from localhost ([127.0.0.1]:52956 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a8wBs-0003yF-Lm for submit@debbugs.gnu.org; Tue, 15 Dec 2015 15:27:20 -0500 Original-Received: from mail-pa0-f48.google.com ([209.85.220.48]:36846) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a8wBq-0003y2-8D for 22163@debbugs.gnu.org; Tue, 15 Dec 2015 15:27:18 -0500 Original-Received: by mail-pa0-f48.google.com with SMTP id nt2so546545pab.3 for <22163@debbugs.gnu.org>; Tue, 15 Dec 2015 12:27:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:mime-version:content-type; bh=KsxWQYXrfrYCHk8KcCkXFdHuNfcROOa7ZOPA2tzwsn0=; b=qHS8zIDoDBTHgJaZ222c3+uUgdsgnbMUghf7p4g9lUXNuzZx9XWXFV1q54gmcBLJrk 5ATgFGAoDD3krD6i0QzxRBTyRVI4zs6hwvBSfn9sZisE8dkJwwUO0TiN+XFRrGaKoutS F2YMSts/3Eh8V/l0J6N0RkRtkTAJCZ4TWIvqwfIAh7igdhM8CPR+fNcClP1miaz9GtaF Zym63HYoFv8i5GyI+cquhfngkBX+vmi8y/wBC64pdHU4CsxWoYJEbZUOvmiQvTvqrvxC 66Amb2+D8ipWJZudNfD/kuTl4z9N5MPJ1FbNjlWZWBeVGzXx/nKSIs8VtllKO3wLKRTA ZnlQ== X-Received: by 10.66.150.37 with SMTP id uf5mr58311977pab.30.1450211232537; Tue, 15 Dec 2015 12:27:12 -0800 (PST) Original-Received: from Vulcan.local (76-234-68-79.lightspeed.frokca.sbcglobal.net. [76.234.68.79]) by smtp.gmail.com with ESMTPSA id yl1sm4044530pac.35.2015.12.15.12.27.10 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 15 Dec 2015 12:27:10 -0800 (PST) X-Google-Original-From: "John Wiegley" Original-Received: by Vulcan.local (Postfix, from userid 501) id E54811174D393; Tue, 15 Dec 2015 12:27:09 -0800 (PST) In-Reply-To: (Simon Friis Vindum's message of "Tue, 15 Dec 2015 21:15:29 +0100") User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.5 (darwin) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:110032 Archived-At: >>>>> Simon Friis Vindum writes: > I was thinking that one might define a new built-in function. It could for > instance be called `define-key-release` and behave exactly like `define-key` > except that the passed command would be triggered on key release instead of > key press. > > It seems to me like that would be backwards compatible and non-invasive. Sure, from the point of view of `define-key', it would be. What I meant is that key-handling right now is done on the basis of received events, and that "key pressed down" is not an event. We only have "key pressed". I don't know how hard it would be to break up key events into multiple phases, or how backwards compatible it would be to see a union of up/down phases as equivalent to what we know now as a "key press" event. -- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2