From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.devel Subject: Re: Keyboard Access For gdb-ui.el (from emacs 21.3.50 CVS) Date: Wed, 06 Aug 2003 14:28:05 -0600 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <3F3164D5.4030108@yahoo.com> References: <16171.9294.617646.195373@gargle.gargle.HOWL> <16171.40665.169763.660763@nick.uklinux.net> <16171.54169.662825.486971@gargle.gargle.HOWL> <16172.52011.121221.726593@nick.uklinux.net> <16176.1988.70569.874168@nick.uklinux.net> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1060202230 22583 80.91.224.253 (6 Aug 2003 20:37:10 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 6 Aug 2003 20:37:10 +0000 (UTC) Cc: "T. V. Raman" Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed Aug 06 22:37:32 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19kV2K-0001Lb-00 for ; Wed, 06 Aug 2003 22:37:32 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19kV7S-00089J-00 for ; Wed, 06 Aug 2003 22:42:50 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19kUu3-0001dZ-2E for emacs-devel@quimby.gnus.org; Wed, 06 Aug 2003 16:28:59 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19kUtg-0001d9-2d for emacs-devel@gnu.org; Wed, 06 Aug 2003 16:28:36 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19kUt9-0001XY-67 for emacs-devel@gnu.org; Wed, 06 Aug 2003 16:28:35 -0400 Original-Received: from [80.91.224.249] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19kUt8-0001XE-Pd for emacs-devel@gnu.org; Wed, 06 Aug 2003 16:28:02 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19kUsk-0005ZK-00 for ; Wed, 06 Aug 2003 22:27:38 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19kUsj-0005Z9-00 for ; Wed, 06 Aug 2003 22:27:37 +0200 Original-Lines: 50 Original-X-Complaints-To: usenet@main.gmane.org User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 X-Accept-Language: en-us X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:15818 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:15818 Nick Roberts forwarded this from T. V. Raman: > Incidentally given that mouse events are nothing more than list > structures, would it be possible to create a > keyboard-generate-mouse-event function? > > Would be a nice means to exploit some of the newer features of emacs > ---as an example, balloon help in itself may not be > directly useful to the emacspeak user --- you really dont want emacs > intrrupting what you're listening to and tell you things --makes it > too much like the dreaded office-clip from idiot-proven interfaces. On > the other hand it would be nice to ask for a tooltip. > > So I might move through a source file --- and push a key to hear the > value of an identifier spoken to me. Do you use the mouse to move through the source file? If so, you could bind this hacked up `tooltip-keyboard' command to a keyboard event in the global keymap: (defun tooltip-keyboard () "Command handler for keyboard events in `global-map'." (interactive) ;; See tooltip-mouse-motion: (tooltip-hide) (let ((event `(mouse-movement (,(selected-window) ,(point) (nil . nil) ,(tooltip-time))))) (setq tooltip-last-mouse-motion-event event) (tooltip-start-delayed-tip))) (defsubst tooltip-time () "The current time in milliseconds, for use as a mouse event TIMESTAMP." ;; This should be done as an integer calculation that wraps around: (let ((time (current-time))) (+ (* 1000 ;; seconds since the Epoch: (+ (* 1.0 (expt 2 16) (car time)) (cadr time))) (/ 1000.0 ;; additional microseconds: (car (cddr time)))))) If you don't use the mouse at all, it gets tricky because we have to generate pixel coordinates for the fake mouse event from point in the selected window, which I can't figure out how to do... -- Kevin Rodgers