Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Whenever someone launches file manager from launcher /usr/bin/nautilus is executed through nautilus.desktop. Now, in nautilus, if the user presses ,Ctrl+T, a new tab is opened. For this to happen, some file or commands must be executed. Where are these files or commands stored?

There are no keyboard-specific executables in usr/bin/. In short what does OS do when some keyboard shortcut is used?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

The keyboard shortcuts for nautilus are defined in ~/.config/nautilus/accels file.

share|improve this answer
    
But, how does it work? It shows a path like <Actions>/ShellActions/New Tab but find ShellActions says that there is no such directory. Where does that path lead to? –  hatter Nov 8 '13 at 9:05
    
And, what is the case with other applications? ~/.config lists only some applications –  hatter Nov 8 '13 at 9:12
    
@nitish That file (~/.config/nautilus/accels) is an automated accelerator map dump loaded by Nautilus using Gtk3 (Gtk.AccelMap.load()). If you have good knowledge in C++ programming, you should get a look on the nautilus source code to understand how exactly. In general the shortcuts for an application are defined in its source code. –  Radu Rădeanu Nov 8 '13 at 9:22
    
@nitish The purpose of ~/.config directory is for program configuration and user setting files. Not all programs need to keep configuration files in there. That's why you don't see all the apps there. –  Radu Rădeanu Nov 8 '13 at 9:32
    
Thanks. Now I get it –  hatter Nov 8 '13 at 9:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.