Xfce Forum

Sub domains
 

You are not logged in.

#1 2014-01-19 15:14:54

foolius
Member
Registered: 2014-01-19
Posts: 4

[Solved] Disable F1 in Terminal

Hi everybody.

I want to stop the help popping up when I press F1 in the terminal emulator, so the program in the terminal gets the keystroke.
I found: this and thought it would work for me, so I created the file and added this line:
(gtk_accel_path "<Actions>/terminal-window/contents" "")
But now things became very strange. I could not choose the tabs with Alt+x anymore and suddenly there were many other things in the accels.scm file and it seemed like it gets changed all the time, too.

How is this accels.scm file supposed to work? I couldn't find any documentation for this.

Xfce Version: 4.10
Arch Linux updated today(19.1.2014)

Offline

#2 2014-01-19 17:05:07

ToZ
Moderator
From: Toronto, Canada
Registered: 2011-06-02
Posts: 1,063

Re: [Solved] Disable F1 in Terminal

Verified that the same is happening here and had a quick look through the code. It would appear that when you try to override a key accelerator by creating an accels.scm file (and on subsequent use of an accelerator), the system populates the accels.scm file with all supposed values and correctly uncomments and sets your additions as overrides. So far so good.

Unfortunately, the goto-tab-X accelerators are never properly carried over to this file (I believe because they are never properly added to the internal resource file).
[References]
- initial load of resource file: http://git.xfce.org/apps/xfce4-terminal … dow.c#n194
- load of accelerator map (note the additional code to add goto-tab accelerators: http://git.xfce.org/apps/xfce4-terminal … app.c#n262
- save of accelerator map: http://git.xfce.org/apps/xfce4-terminal … app.c#n214

I will create a bug report for this. In the meantime, to make the goto-tab accelerators work, for every goto-tab-X line in accels.scm:

; (gtk_accel_path "<Actions>/terminal-window/goto-tab-2" "")

...uncomment the line and add the accelerator key combination:

(gtk_accel_path "<Actions>/terminal-window/goto-tab-1" "<ALT>1")
.....
(gtk_accel_path "<Actions>/terminal-window/goto-tab-2" "<ALT>2")

...and add the ones that are missing:

(gtk_accel_path "<Actions>/terminal-window/goto-tab-3" "<ALT>3")
(gtk_accel_path "<Actions>/terminal-window/goto-tab-4" "<ALT>4")

Offline

#3 2014-01-19 17:16:22

ToZ
Moderator
From: Toronto, Canada
Registered: 2011-06-02
Posts: 1,063

Re: [Solved] Disable F1 in Terminal

Offline

#4 2014-01-19 17:40:48

foolius
Member
Registered: 2014-01-19
Posts: 4

Re: [Solved] Disable F1 in Terminal

Thanks very much for the fast reply.

I must say, I'm a bit proud to discover a bug ^^

Offline

#5 2014-01-19 17:55:51

foolius
Member
Registered: 2014-01-19
Posts: 4

Re: [Solved] Disable F1 in Terminal

OK, I was too fast marking this as solved.

I've not figured out when, but at a specific action the line with goto-tab-1 gets overwritten and I'm not able to bind this accordingly.

But I can wait until the bug gets fixed. Hopefully this gets fixed too then.

Offline

#6 2014-01-19 18:07:44

ToZ
Moderator
From: Toronto, Canada
Registered: 2011-06-02
Posts: 1,063

Re: [Solved] Disable F1 in Terminal

foolius wrote:

OK, I was too fast marking this as solved.

I've not figured out when, but at a specific action the line with goto-tab-1 gets overwritten and I'm not able to bind this accordingly.

But I can wait until the bug gets fixed. Hopefully this gets fixed too then.

So its overwriting that value. I guess the real solution lies in the bug fix.

As another temporary workaround (how many can there possibly be?), you can try setting the file as immutable (un-writeable) after you make the change so it doesn't get updated by anything/anyone via:

sudo chattr +i ~/.config/xfce4/terminal/accels.scm

If you need to make changes to the file, then simply reverse the command:

sudo chattr -i ~/.config/xfce4/terminal/accels.scm

...(these code snippets assume you have sudo installed, otherwise make the change with root privlidges)

Offline

#7 2014-01-19 18:13:21

foolius
Member
Registered: 2014-01-19
Posts: 4

Re: [Solved] Disable F1 in Terminal

Thanks very much, I will see if it will annoy me so much, that I will do that.

Offline

#8 2014-01-20 01:42:40

MountainDewManiac
Member
From: USA police-state welfare-state
Registered: 2013-03-24
Posts: 268

Re: [Solved] Disable F1 in Terminal

I know that in XFCE's graphical settings somewhere is one that allows you to change things like that. For example, at one point I changed the "menu button" from ALT-F1 to the "Windows" button. I assume that now if I press ALT-F1, it will just see it as that (as it no longer opens the desktop menu). Have you t ried using XFCE's graphical configuration menu to pick a different keypress for the "help" command, perhaps something obscure that you don't expect to otherwise use? With it going on the Internet and pulling up sparse (and possibly outdated?) information, the Help command is not of great utility anyway, lol.

Regards,
MDM

Offline

Board footer

Powered by FluxBB