<span class="mw-page-title-main">Shortcuts</span>
Elena & Fabrice's Web

Shortcut

A shortcut is what differentiate the expert from the dilettante, the genius from the laborious. Even the expert has to go through the long way home, occasionally, but their routine practice of the Art will take all the possible shortcuts.

Keyboards

I use keyboard shortcuts a lot, for instance, lw in krunner brings me to this web (like wp does for wikipedia or gg for google). This you can get with in Web Shortcuts (best defined from konqueror):

http://laussy.org/wiki/Special:Search?search=\{@}&go=Go

Keymapper

For general keyboard shortcuts, we use keymapper. It seems that xkeysnail is also good.

Shortcuts in use: (by alphabetical order)

  1. Ctrl+Alt+B opens by bibTeX file.
  2. Ctrl+Alt+ShiftRight+C generates a {{onlinecite|}}
  3. Ctrl+Alt+C generates a {{cite|}}
  4. Ctrl+Alt+N generates a <nowiki></nowiki> section.
  5. Ctrl+Alt+P generates a <pre></pre> tag.
  6. Ctrl+Alt+Q generates a {{quote|}}.
  7. Ctrl+Alt+Shift+Q generates a {{onlinequote|}}.
  8. Ctrl+Alt+R generates a == References ==<references /> section.
  9. Ctrl+Alt+T generates a <tt></tt> tag
  10. Ctrl+Alt+W generates a wz <wz tip="">(?!)</wz> tag.
  11. Ctrl+Alt+Shift+W generates a <wz tagtotip=></wz><span id=""></span> tag.
  12. Ctrl+Shift+Space generates an unbreakable space &nbsp;

The file to define the shortcuts is in ~/.config/keymapper.conf. The application runs with keymapper -u (where -u is for updating the rules from the file). Importantly: the keyboard in this file is assumed QWERTY, so use 'A' for 'Q', etc.

To kill the key-mapping:

sudo pkill -f keymapperd
pkill -f keymapper

and restart it: (use -v for both to have verbose output)

sudo keymapperd &
keymapper&

Discontinued:

  1. Ctrl+Alt+J generates a Julia snippet:
    <syntaxhighlight lang="python"></syntaxhighlight>
    which is actually python until I get support for julia.

Limitations:

I didn't figure out how to write outputs from programs, e.g., the current date (it doesn't understand /dev/tty or /dev/stdout, though it can output to tty but that's for terminals only). This should be possible with xdotool below:

Aliases

My aliases are defined in ~/.bash_aliases and include (ll is for laussy-laussy):

alias lls='sudo updatedb'

Actually, lls is slightly more elaborate (outputs information, time taken and relies on sudoer) powered by bash functions lls(){} but this is the idea.

xdotool

xdotool is a computer program to simulate input devices, e.g., the keyboard or the mouse.

For instance, entering the following in a console

xdotool click 2

simulates the mouse middle-click, which is typically associated to paste from last selected content. So from adding this as a new command in shortcuts in KDE's System Settings, one can emulate mapping the middle-click button to a keyboard key (in my case Ctrl+Shift+V)

  1. Ctrl+Shift+V clicks the mouse middle button (past last selected content)