Recently, vanberge and rusty have been longing to use the classic AIM emoticon keyboard shortcuts in Pidgin.
Pidgin trac ticket 2675 from three years ago indicated they weren’t going to implement this functionality but one could implement using keyboard bindings in the gtkrc-2.0 file as described in the FAQ. (See also the sample gtkrc-2.0 file for other options that one could use with Pidgin.)
Anyway, I put together a set of bindings to mimic the AIM keyboard shortcuts. <CTRL>+1 through 8 worked as expected, but I had trouble getting the <CTRL>+<SHIFT>+# ones to work until vanberge asked the friendly folks in #pidgin how to do it, so kudos to him for figuring that part out.
To use these bindings, find your “.purple” directory and if the gtkrc-2.0 file doesn’t already exist (mine didn’t), create a new one called “gtkrc-2.0″ and copy/paste the following lines in to it (use the “view source” icon in the upper right of the code box below to open the code in a new window without line numbers or “copy to clipboard” to copy directly to your clipboard)
binding "aim-emoticon-shortcuts"
{
bind "<ctrl>1" { "insert-at-cursor" (":-)") }
bind "<ctrl>2" { "insert-at-cursor" (":-(") }
bind "<ctrl>3" { "insert-at-cursor" (";-)") }
bind "<ctrl>4" { "insert-at-cursor" (":-P") }
bind "<ctrl>5" { "insert-at-cursor" ("=-O") }
bind "<ctrl>6" { "insert-at-cursor" (":-*") }
bind "<ctrl>7" { "insert-at-cursor" (">:O") }
bind "<ctrl>8" { "insert-at-cursor" ("8-)") }
bind "<ctrl>exclam" { "insert-at-cursor" (":-$") }
bind "<ctrl>at" { "insert-at-cursor" (":-!") }
bind "<ctrl>numbersign" { "insert-at-cursor" (":-[") }
bind "<ctrl>dollar" { "insert-at-cursor" ("O:-)") }
bind "<ctrl>percent" { "insert-at-cursor" (":-/") }
bind "<ctrl>asciicircum" { "insert-at-cursor" (":'(") }
bind "<ctrl>ampersand" { "insert-at-cursor" (":-X") }
bind "<ctrl>asterisk" { "insert-at-cursor" (":-D") }
}
widget "*pidgin_conv_entry" binding "aim-emoticon-shortcuts"
Once the gtkrc-2.0 file has been created/updated/saved, restart Pidgin. Once back in any chat window, use the shortcuts to insert the emoticon text, just like in AIM!