From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24354 invoked by alias); 23 Feb 2013 00:52:19 -0000 Received: (qmail 24345 invoked by uid 22791); 23 Feb 2013 00:52:18 -0000 X-SWARE-Spam-Status: No, hits=-7.2 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 23 Feb 2013 00:52:03 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r1N0q37V007920 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 22 Feb 2013 19:52:03 -0500 Received: from valrhona.uglyboxes.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r1N0q1Js010306 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Fri, 22 Feb 2013 19:52:03 -0500 Message-ID: <512812B1.3040509@redhat.com> Date: Sat, 23 Feb 2013 00:52:00 -0000 From: Keith Seitz User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0 MIME-Version: 1.0 To: Bruce Dawson CC: "insight@sourceware.org" Subject: Re: Changing keyboard bindings References: <2AC155A009400B4C8B05D518E4819AEF0719C063@exchange10.valvesoftware.com> In-Reply-To: <2AC155A009400B4C8B05D518E4819AEF0719C063@exchange10.valvesoftware.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00029.txt.bz2 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 > to use for other long-time Windows developers. Can anybody point me > to where I should look in order to try reconfiguring the keyboard > bindings (step, run, etc.) to match Visual Studio bindings? These are hiding in src/gdb/gdbtk/library/srcbar.itcl. The various menus there add the -accelarator, but right now, they are hard-coded. > Such a change would have to be optional because I'm sure that the > Linux community at large does not value Visual Studio compatibility, > but for the initial test version I'm okay with having the change be > unconditional. Ideally, I would add a bunch of stuff for this to the Source Preferences, allowing the user to select from a standard list of preferences, such as "Traditional"/"Classic" for what we have now and "Windows/Visual Studio" or something. Selecting one of these would automatically fill-in all the accelerator fields, and APPLY/OK (dismissing the dialog) would then use this set to save the bindings into a bunch of new preferences, one for each accelerator (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 want 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 of 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, you'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