Changing the shorcut key for Rox's 'Terminal here' option

Using applications, configuring, problems
Message
Author
jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#21 Post by jpeps »

GustavoYz wrote:No, you're wrong: the line WASN'T there and I've to write it into the file.
The comment could say wherever it wants, this method works.

And yes, I was missing the point, because I've assume that your file was exactly equal that mine and you doesn't told me that yours its different. Mine doesn't include this line.

If you already knew the solution of this issue from the very begging, why don't you post it?
I ran pfix=ram in Lucid 520, and here's the file:

Code: Select all

# -- THEME AUTO-WRITTEN DO NOT EDIT
include "/usr/share/themes/Gradient-grey/gtk-2.0/gtkrc"

style "user-font" {
	font_name = "DejaVu Sans 11"
}

widget_class "*" style "user-font"

gtk-font-name="DejaVu Sans 11"

include "/root/.gtkrc.mine"

# -- THEME AUTO-WRITTEN DO NOT EDIT
If it's auto-written, I guess that means it gets written by something else..so subject to changes depending on configurations

The solution noted by disciple was to add a /root/.gtkrc.mine file as he indicated. That is not there by default.

edit: If the include/.gktrc line is getting erased, I think that would qualify as a reportable bug.

User avatar
GustavoYz
Posts: 883
Joined: Wed 07 Jul 2010, 05:11
Location: .ar

#22 Post by GustavoYz »

Yes...
I've understood disciple post, although i never understood yours:
If it's the same .gtkrc-2.0 file that's in LUPU it is..also, it's auto-written, so doesn't get edited.
Anyway, before create a new file I just add the line on the old one, test it and works too.
This is a Solved issue...
Thanks!

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#23 Post by greengeek »

Sounds like a useful function - just getting this on my list as i think it will help me with some rox features i want to modify or utilise more.

User avatar
drunkjedi
Posts: 882
Joined: Mon 25 May 2015, 02:50

#24 Post by drunkjedi »

Hmm.
Bookmarking.

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#25 Post by Flash »

Hmm, so it can be useful to resurrect old threads? :wink:

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#26 Post by greengeek »

Flash wrote:Hmm, so it can be useful to resurrect old threads? :wink:
Definitely.
Puppy linux is like fashion - wait 30 years and old ideas come back in style :-)

This forum is a treasure trove.

User avatar
LazY Puppy
Posts: 1934
Joined: Fri 21 Nov 2014, 18:14
Location: Germany

#27 Post by LazY Puppy »

Just some additional information to the issue...

The results of changing the Rox filer keyboard shortcuts are stored in:

/root/.config/rox.sourceforge.net/ROX-Filer/menus2

If such changes should find its way to be used when booting RAM only, one needs to copy /root/.config/rox.sourceforge.net/ROX-Filer/menus2 to /tmp/root/.config/rox.sourceforge.net/ROX-Filer/menus2 when remastering comes to grab files from /root to be included into the remastered puppy.

On can also define keyboard shortcuts for those files in:

/root/Choices/Templates

They do appear in the right-click menu as well.

These shortcuts are also stored in:

/root/.config/rox.sourceforge.net/ROX-Filer/menus2
RSH

"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:

No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#28 Post by greengeek »

LazY Puppy wrote:Just some additional information to the issue...

The results of changing the Rox filer keyboard shortcuts are stored in:

/root/.config/rox.sourceforge.net/ROX-Filer/menus2
I'm confused - it looks like that file is just a summary of the actual shortcuts - is there a way to modify a file somewhere to add or modify the shortcuts and remember the changes across a reboot?
cheers

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#29 Post by disciple »

Did you try editing it while rox was running?
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#30 Post by greengeek »

disciple wrote:Did you try editing it while rox was running?
Yes. And then I restarted rox (and x server) but it didnt seem to pick up the modification.

I'm still trying to get familiar with these shortcuts - I got the shortcut modification "hover over menu" method (that you suggested) running on Slacko 5.6 but still can't make it work in Slacko 6.3.0.1 (32bit) so I thought I would try to find the config file that remembers the settings across a boot.

The "menus2" file RSH mentioned has the following statement at the top:

Code: Select all

this file is an automated accelerator map dump
so I don't know if that is a config file that is modifiable.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#31 Post by greengeek »

Well, I just tried it again - I modified that menu2 file while rox was running, then closed all rox windows and entered the following syntax into a terminal:

Code: Select all

# killall ROX-Filer; rox -p ~/Choices/ROX-Filer/PuppyPin
and the change I made is now working. Thanks for the help
cheers!

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#32 Post by disciple »

What I was trying to get at was that rox probably writes it when shutting down, so if you want to edit it manually you should do it when rox is NOT running...
Presumably by killing it you prevented it from shutting down properly and overwriting your changes.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#33 Post by greengeek »

disciple wrote:so if you want to edit it manually you should do it when rox is NOT running...
Presumably by killing it you prevented it from shutting down properly and overwriting your changes.
In an effort to better understand how this menus2 file is handled i just compared the original version of menus2 with the version that has been modified by roxfiler "on-the-fly" via the user hovering over the function/shortcut that they want to be changed.

There are significant differences between these two files - beyond just a simple one line change of the affected shortcut. For example - after rox has automatically modified it's shortcut in response to the users hovering over the menu the menus2 file loses all of its <dnd> definitions (whatever they are). Also the overall contents are in a different order.

And the shortcut that has been "auto modified" loses it's preceeding semicolon as follows:

Code: Select all

; (gtk_accel_path "<filer>/File/Set Type..." "")
; (gtk_accel_path "<filer>/Window/New Window" "")
; (gtk_accel_path "<filer>/Display/Show Hidden" "<Primary>h")
(gtk_accel_path "<filer>/Window/Terminal Here" "at")
; (gtk_accel_path "<filer>/Display/Save Current Display Settings..." "")
; (gtk_accel_path "<filer>/Display/Filter Files..." "")
; (gtk_accel_path "<filer>/New/Customise Menu..." "")
; (gtk_accel_path "<filer>/Select/Select If..." "<Shift>question")	

I really need to look more closely into these changes to work out how it might be possible to manually change an option. Maybe I need to discard the original file and substitute the modified one from the get go.

EDIT : Also - it seems that roxfiler uses some unusual ways of defining the chosen shortcut character. For example - if I try to specify the @ character in the menus2 file it is not accepted. Roxfiler calls it "at" and that is how it has to be written in the file.

Similarly, if I try to use the ^ key as my shortcut and i call it a "caret" (which is what I thought it was called) it does not work. Roxfiler wants it to be defined as follows:

Code: Select all

(gtk_accel_path "<filer>/Window/Terminal Here" "asciicircum")
I wonder if there is a list somewhere of what roxfiler calls each of these keyboard characters?
Also - what is "<Primary>h" - is that ctrl+h ?
And why "<Shift>exclam" instead of "<Shift>1" or just "exclam" ?

Bit more trial and error needed yet to come...

EDIT 2 : It seems that it is critical to remove the semicolon - if the semicolon is put back in it prevents roxfiler from seeing the new character that you have manually entered and reverts to the backtick ` character.
Last edited by greengeek on Tue 04 Oct 2016, 21:16, edited 2 times in total.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#34 Post by disciple »

The semicolon comments lines out as they aren't needed unless the default is changed... so only the changed lines would need to be included for a remaster.

If you want a list of characters you might need to look in the source to find out what they are or where they come from. Why are you so interested in manually editing the configuration though?
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#35 Post by greengeek »

disciple wrote:. Why are you so interested in manually editing the configuration though?
I am making .pets which allow Puppys such as Slacko 6.3.0.1 to be optimised for use on a touchscreen tablet (x86 style not Android).

Much of the functionality of rox is attached to the rightclick mouse button which of course does not exist on a touchscreen. In order to get access to the normal functions i am considering modifying rox shortcuts and attaching them to a new desktop "root:1" jwm menu.

I am part way through this project and I had a "semi-solution" that involved using xdotool to send a backslash \ character to roxfiler as that is the shortcut which brings up the context menu. It worked but had the downside that the user could accidentally send the backslash character to a text editor or word processor inadvertently so my thinking was that I might be able to change that shortcut to something more esoteric that would not upset a text editor.

In the end Mochi Moppel explained how to use xdotool to pass the "menu" key to rox (I didnt even realise there was a menu key on my keyboard...) and now it works well.
(solution post here)

However - there was another thing i wanted to attempt and that was to try to modify the contents of the context menu to include other functions that I may need later.

The reason that I needed to understand how the menus2 file worked was that I needed to make the changes via the pinstall.sh function of a .pet rather than running the update method manually. At least now i have a basic understanding of the functionality of the menus2 file and it offers me scope for fine tuning roxfiler functions to better suit touchscreen needs.

Thanks for the help,
cheers!

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#36 Post by greengeek »

greengeek wrote:Also - it seems that roxfiler uses some unusual ways of defining the chosen shortcut character. For example - if I try to specify the @ character in the menus2 file it is not accepted. Roxfiler calls it "at" and that is how it has to be written in the file.

Similarly, if I try to use the ^ key as my shortcut and i call it a "caret" (which is what I thought it was called) it does not work. Roxfiler wants it to be defined as follows:

Code: Select all

(gtk_accel_path "<filer>/Window/Terminal Here" "asciicircum")
I wonder if there is a list somewhere of what roxfiler calls each of these keyboard characters?
See here:
http://www.in-ulm.de/~mascheck/X11/keysyms.txt

EDIT : Can use the following command to see current layout/descriptions for your keyboard:

Code: Select all

xmodmap -pke

Post Reply