public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] OT -  Changing accellerator keys in gnome-terminal
@ 2006-11-05 15:13 Michael Sullivan
  2006-11-05 15:40 ` Markus Schönhaber
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Sullivan @ 2006-11-05 15:13 UTC (permalink / raw
  To: gentoo-user

Is it possible to change the accellerator keys in gnome-terminal?  I
would like to change

Copy from Cntrl+Shift+C to Cntrl+C
Paste from Cntrl+Shift+P to Cntrl+P

(like it is in just about every other gnome app).  I was looking at the
source code for gnome-terminal, at a file called terminal-accels.c and I
see a function:

static KeyEntry edit_entries[] =
{
  { N_("Copy"),
    KEY_COPY, ACCEL_PATH_COPY, 0, 0, NULL, FALSE },
  { N_("Paste"),
    KEY_PASTE, ACCEL_PATH_PASTE, 0, 0, NULL, FALSE },
};

I think this is what I need to edit; the problem is that I'm not very
experienced with C and I'm not experienced at all with GTK.  From
cross-referencing what I see above with both the rest of the current
file and the accompanying header file I see 

#define KEY_COPY CONF_KEYS_PREFIX"/copy"
#define KEY_PASTE CONF_KEYS_PREFIX"/paste"

#define ACCEL_PATH_COPY ACCEL_PATH_ROOT"/copy"
#define ACCEL_PATH_PASTE ACCEL_PATH_ROOT"/paste"

I know these commands are declaring constants, and I know that CONF_KEYS_PREFIX eventually translates into CONF_PREFIX, which translates into "/apps/gnome-terminal" in terminal-profile.h, but I have no idea what /apps/gnome-terminal does in this context (isn't that what I'm trying to build here?)  Am I even close?


-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] OT -  Changing accellerator keys in gnome-terminal
  2006-11-05 15:13 [gentoo-user] OT - Changing accellerator keys in gnome-terminal Michael Sullivan
@ 2006-11-05 15:40 ` Markus Schönhaber
  2006-11-05 15:48   ` Michael Sullivan
  0 siblings, 1 reply; 4+ messages in thread
From: Markus Schönhaber @ 2006-11-05 15:40 UTC (permalink / raw
  To: gentoo-user

Michael Sullivan wrote:
> Is it possible to change the accellerator keys in gnome-terminal?  I
> would like to change
>
> Copy from Cntrl+Shift+C to Cntrl+C
> Paste from Cntrl+Shift+P to Cntrl+P
>
> (like it is in just about every other gnome app).  I was looking at the
> source code for gnome-terminal, at a file called terminal-accels.c and I
> see a function:
>
> static KeyEntry edit_entries[] =
> {
>   { N_("Copy"),
>     KEY_COPY, ACCEL_PATH_COPY, 0, 0, NULL, FALSE },
>   { N_("Paste"),
>     KEY_PASTE, ACCEL_PATH_PASTE, 0, 0, NULL, FALSE },
> };
[...]

Why don't you simply use "Keyboard Shortcuts..." from gnome-terminal's "Edit" 
menu?

BTW: I wouldn't call it a good idea to map Ctrl-C to something in a terminal 
emulator, since Ctrl-C is normally used to interrupt the running program in 
the shell. I wouldn't want to sacrifice this ability.

Regards
  mks
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] OT -  Changing accellerator keys in gnome-terminal
  2006-11-05 15:40 ` Markus Schönhaber
@ 2006-11-05 15:48   ` Michael Sullivan
  2006-11-05 16:08     ` Markus Schönhaber
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Sullivan @ 2006-11-05 15:48 UTC (permalink / raw
  To: gentoo-user

On Sun, 2006-11-05 at 16:40 +0100, Markus Schönhaber wrote:
> Michael Sullivan wrote:
> > Is it possible to change the accellerator keys in gnome-terminal?  I
> > would like to change
> >
> > Copy from Cntrl+Shift+C to Cntrl+C
> > Paste from Cntrl+Shift+P to Cntrl+P
> >
> > (like it is in just about every other gnome app).  I was looking at the
> > source code for gnome-terminal, at a file called terminal-accels.c and I
> > see a function:
> >
> > static KeyEntry edit_entries[] =
> > {
> >   { N_("Copy"),
> >     KEY_COPY, ACCEL_PATH_COPY, 0, 0, NULL, FALSE },
> >   { N_("Paste"),
> >     KEY_PASTE, ACCEL_PATH_PASTE, 0, 0, NULL, FALSE },
> > };
> [...]
> 
> Why don't you simply use "Keyboard Shortcuts..." from gnome-terminal's "Edit" 
> menu?
> 
> BTW: I wouldn't call it a good idea to map Ctrl-C to something in a terminal 
> emulator, since Ctrl-C is normally used to interrupt the running program in 
> the shell. I wouldn't want to sacrifice this ability.
> 
> Regards
>   mks

Could I map Cntrl+C for abort to something more intuitive?  Like Esc?

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] OT -  Changing accellerator keys in gnome-terminal
  2006-11-05 15:48   ` Michael Sullivan
@ 2006-11-05 16:08     ` Markus Schönhaber
  0 siblings, 0 replies; 4+ messages in thread
From: Markus Schönhaber @ 2006-11-05 16:08 UTC (permalink / raw
  To: gentoo-user

Michael Sullivan wrote:
> On Sun, 2006-11-05 at 16:40 +0100, Markus Schönhaber wrote:
> > BTW: I wouldn't call it a good idea to map Ctrl-C to something in a
> > terminal emulator, since Ctrl-C is normally used to interrupt the running
> > program in the shell. I wouldn't want to sacrifice this ability.
>
> Could I map Cntrl+C for abort to something more intuitive?  Like Esc?

You'd have to check the docs of the application running inside 
gnome-terminal - propably your shell - to find out if this is at all 
possible. I don't know.

Regards
  mks

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-11-05 16:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-05 15:13 [gentoo-user] OT - Changing accellerator keys in gnome-terminal Michael Sullivan
2006-11-05 15:40 ` Markus Schönhaber
2006-11-05 15:48   ` Michael Sullivan
2006-11-05 16:08     ` Markus Schönhaber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox