From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16800 invoked by alias); 23 Feb 2013 02:00:30 -0000 Received: (qmail 16633 invoked by uid 22791); 23 Feb 2013 02:00:29 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx3.valvesoftware.com (HELO mx3.valvesoftware.com) (208.64.203.145) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 23 Feb 2013 02:00:25 +0000 Received: from mx3.valvesoftware.com (127.0.0.1) id h4utu80171sr for ; Fri, 22 Feb 2013 10:41:39 -0800 (envelope-from ) Received: from mx3.valvesoftware.com ([172.16.1.53]) by mx3.valvesoftware.com (SonicWALL 7.3.6.7163) with ESMTP; Fri, 22 Feb 2013 10:41:39 -0800 Received: from FEDEX1.valvesoftware.com (172.16.1.101) by exchange10.valvesoftware.com (172.16.1.53) with Microsoft SMTP Server (TLS) id 14.2.318.4; Fri, 22 Feb 2013 18:00:24 -0800 Received: from EXCHANGE10.valvesoftware.com ([fe80::995a:b010:5730:9af]) by fedex1.valvesoftware.com ([::1]) with mapi id 14.02.0318.004; Fri, 22 Feb 2013 18:00:23 -0800 From: Bruce Dawson To: Keith Seitz CC: "insight@sourceware.org" Subject: RE: Changing keyboard bindings Date: Sat, 23 Feb 2013 02:00:00 -0000 Message-ID: <2AC155A009400B4C8B05D518E4819AEF0719C19B@exchange10.valvesoftware.com> References: <2AC155A009400B4C8B05D518E4819AEF0719C063@exchange10.valvesoftware.com> <512812B1.3040509@redhat.com> In-Reply-To: <512812B1.3040509@redhat.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: 86b76815-e903-4403-b95d-5abb05264373 X-Mlf-Version: 7.3.6.7163 X-Mlf-UniqueId: o201302221841390000703 X-IsSubscribed: yes Mailing-List: contact insight-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-owner@sourceware.org X-SW-Source: 2013-q1/txt/msg00030.txt.bz2 I found three places in srcbar.itcl where "accelerator N" is specified -- t= wice for the Control menu and once for the "trace" menu which I assume is t= he toolbar with the step and next buttons. However when I change all three = occurrences of N to Q and do make/make install it affects the Control menu = but not the toolbar. I also noticed that srctextwin.itb does some binding with bind_plain_key --= it looks like that is what affects what is actually processed, as opposed = to what is actually shown. -----Original Message----- From: Keith Seitz [mailto:keiths@redhat.com]=20 Sent: Friday, February 22, 2013 4:52 PM To: Bruce Dawson Cc: insight@sourceware.org Subject: Re: Changing keyboard bindings On 02/22/2013 04:32 PM, Bruce Dawson wrote: > I'm a long-time Windows developer and I'd like to make Insight easier=20 > to use for other long-time Windows developers. Can anybody point me to=20 > where I should look in order to try reconfiguring the keyboard=20 > bindings (step, run, etc.) to match Visual Studio bindings? These are hiding in src/gdb/gdbtk/library/srcbar.itcl. The various menus th= ere add the -accelarator, but right now, they are hard-coded. > Such a change would have to be optional because I'm sure that the=20 > Linux community at large does not value Visual Studio compatibility,=20 > but for the initial test version I'm okay with having the change be=20 > unconditional. Ideally, I would add a bunch of stuff for this to the Source Preferences, a= llowing the user to select from a standard list of preferences, such as "Tr= aditional"/"Classic" for what we have now and "Windows/Visual Studio" or so= mething. Selecting one of these would automatically fill-in all the acceler= ator fields, and APPLY/OK (dismissing the dialog) would then use this set t= o save the bindings into a bunch of new preferences, one for each accelerat= or (all 36 of them!). This is probably quite a bit of work to do, though. Probably far more than you'd want to tackle. Probably more than I would wan= t to tackle right now! In any case, I would add a bunch of calls in srcbar.itcl to "pref get" to get these preferences, one for each accelerator. Replace each appearance of "-accelerator XXX" with "-accelerator [pref get = gdb/src/accel/DESCRIPTION]", where DESCRIPTION is some simple description o= f the menu item, e.g., "run", "step", "next", "nexti", "open", "close", and= so on. Then in library/prefs.tcl, edit pref_set_defaults and add all of these with= default values. [If you go the long-winded route of adding default sets, y= ou'd set a default keyboard binding set as well.] The code in that procedure is pretty easy to follow/mimic/cut-n-paste: pref define gdb/src/accel/open "Ctrl+O" pref define gdb/src/accel/run "R" and so on Keith