LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Names of common actions in xml? (https://www.linuxquestions.org/questions/linux-desktop-74/names-of-common-actions-in-xml-884821/)

nokangaroo 06-06-2011 09:45 AM

Names of common actions in xml?
 
I'd like to remap the Command keys on my Apple keyboard to Ctrl. Remapping with xmodmap does not work unfortunately, or I'd be finished by now. However, the Super key (Apple Command) is recognized; for instance, I can open pcmanfm with S-H. What I need now is the names of all the actions (Quit,Save,etc)so I can add these commands to $HOME/.config/openbox/lubuntu-rc.xml. (The common actions like C-Q for Quit, C-S for Save are not even in there). I could replace all "C" entries with "S", but that's not what I want; I want to keep the original Ctrl keys.

So how can I write an xml file that will make all the common commands (including C-O, C-X for nano) available by pressing Super instead of Ctrl, while keeping the original Ctrl keys?

RockDoctor 06-06-2011 10:24 AM

Quote:

Originally Posted by nokangaroo (Post 4377839)
I'd like to remap the Command keys on my Apple keyboard to Ctrl. Remapping with xmodmap does not work unfortunately, or I'd be finished by now. However, the Super key (Apple Command) is recognized; for instance, I can open pcmanfm with S-H. What I need now is the names of all the actions (Quit,Save,etc)so I can add these commands to $HOME/.config/openbox/lubuntu-rc.xml. (The common actions like C-Q for Quit, C-S for Save are not even in there). I could replace all "C" entries with "S", but that's not what I want; I want to keep the original Ctrl keys.

So how can I write an xml file that will make all the common commands (including C-O, C-X for nano) available by pressing Super instead of Ctrl, while keeping the original Ctrl keys?

Not sure if this will help: http://openbox.org/wiki/Help:Bindings

Nevermind - didn't see your earlier post.

nokangaroo 06-06-2011 12:11 PM

Thank you, but I already know that, and I've reset several commands already. What I want to know is the correct format for writing a configuration file (xml or whatever) that will remap system commands like Quit, Save, etc, so that I can use the Apple Command key as an alternative to the Ctrl key.

For instance, I can define a shortcut "W-T" in $HOME/.config/openbox/lubuntu-rc.xml that will open gnome-terminal (which I have installed because it supports drag&drop) using a Command-T shortcut, but that is not enough, because for closing the terminal I still have to contort my fingers using Shift-Ctrl-Q. (I could use Alt-F4, which I have already remapped to Alt-W, but that is probably not exactly the same as Ctrl-Q in all cases, and it still does not give me Command-Q for Quit, Command-D for Exit and Command-S for Save, which I miss most). Like I said xmodmap does not work, so I have to find another method. I'll keep looking in the www, but I don't even know the correct keywords to look for.

Are the Ctrl-Q shortcut and all the other basic shortcuts hardcoded into the system? That would be bad, because then I would actually have to remap the keys somehow - without xmodmap.

RockDoctor 06-06-2011 01:44 PM

I think all the keyboard shortcuts like Shift-Ctrl-Q for File->Quit in lxterminal (the example I happen to be looking at as I write this) are application-specific. Just had a look at Glade; the menu accelerators are definitely application-specific. What you appear to need is something that will map a key combination that's easy for you to enter (like Ctrl-Q) to one that the app understands (like Shift-Ctrl-Q). Hope you can find what you need.

ikisham 06-09-2011 08:06 PM

Exactly, those commands are specific to the apps.
i.e. in pcmanfm you use ctrl+t to open a tab and ctrl+w to close it, ctrl+n to open a new window and ctrl+q to close a window or ctrl+shift+n to create a new directory etc.Those are common bindings to many apps.
In the terminal you can use ctrl+d to exit and it will close the active window/tab.
etc.


All times are GMT -5. The time now is 09:24 PM.