LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 06-06-2011, 09:45 AM   #1
nokangaroo
Member
 
Registered: Nov 2009
Posts: 135

Rep: Reputation: 23
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?

Last edited by nokangaroo; 06-06-2011 at 09:47 AM.
 
Old 06-06-2011, 10:24 AM   #2
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Ubuntu
Posts: 1,210

Rep: Reputation: 238Reputation: 238Reputation: 238
Quote:
Originally Posted by nokangaroo View Post
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.

Last edited by RockDoctor; 06-06-2011 at 10:26 AM.
 
Old 06-06-2011, 12:11 PM   #3
nokangaroo
Member
 
Registered: Nov 2009
Posts: 135

Original Poster
Rep: Reputation: 23
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.

Last edited by nokangaroo; 06-06-2011 at 12:38 PM.
 
Old 06-06-2011, 01:44 PM   #4
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Ubuntu
Posts: 1,210

Rep: Reputation: 238Reputation: 238Reputation: 238
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.
 
Old 06-09-2011, 08:06 PM   #5
ikisham
LQ Newbie
 
Registered: May 2011
Posts: 13

Rep: Reputation: 0
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.
 
  


Reply

Tags
lxde, openbox, shortcut


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using key to match against source.txt file to add xml tags to names in Perl ginny2010 Programming 3 06-22-2010 01:16 PM
xfree86-common xserver-common xfonts-base missing in etch/lenny unev_21 Debian 2 09-11-2009 02:12 AM
Does anyone know where I can find a list of common pet names? abefroman General 24 04-28-2008 10:46 AM
BOGUS.common.04y -> /home/common/Mailbox jayakrishnan Linux - Networking 0 11-19-2005 04:48 AM


All times are GMT -5. The time now is 12:27 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration