From: Keith Seitz <keiths@redhat.com>
To: Bruce Dawson <bruced@valvesoftware.com>
Cc: "insight@sourceware.org" <insight@sourceware.org>
Subject: Re: Changing keyboard bindings
Date: Sat, 23 Feb 2013 00:52:00 -0000 [thread overview]
Message-ID: <512812B1.3040509@redhat.com> (raw)
In-Reply-To: <2AC155A009400B4C8B05D518E4819AEF0719C063@exchange10.valvesoftware.com>
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
next prev parent reply other threads:[~2013-02-23 0:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-23 0:33 Bruce Dawson
2013-02-23 0:52 ` Keith Seitz [this message]
2013-02-23 2:00 ` Bruce Dawson
2013-02-23 2:17 ` Keith Seitz
2013-02-26 0:51 ` Bruce Dawson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=512812B1.3040509@redhat.com \
--to=keiths@redhat.com \
--cc=bruced@valvesoftware.com \
--cc=insight@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).