Switch device-specific Xmodmaps upon USB event with Cuttlefish

I described in an earlier post how to switch keyboard bindings on an Apple keyboard using Ubuntu using Xmodmap. Now, this works great, however I do use the external keyboard just at home with my laptop docking station. When on the move it gave me the unpleasant side-effect that the keybindings on the laptops keyboard were switched too, making the previous fix on the external keyboard a pain on the laptop keyboard.

This is Cuttlefish enters the game, it was created within the 2012 Ubuntu App Showdown and was one of the best submissions. It is a tool that helps you trigger a specific event upon a defined stimulus. In my case I have two possible stimuli, either the external keyboard is connected or it is not. For either scenario there is a reaction described in the above figure.

 

Using this setup it enables me to type on either keyboard as I am used to. Cuttlefish can be installed via PPA:

sudo add-apt-repository ppa:noneed4anick/cuttlefish
sudo apt-get update
sudo apt-get install cuttlefish
Advertisements
This entry was posted in Planet, Ubuntu, Uncategorized and tagged , , , , , , , , . Bookmark the permalink.

2 Responses to Switch device-specific Xmodmaps upon USB event with Cuttlefish

  1. Pingback: Cuttlefish Unity app indicator icon fix for Ubuntu 12.04 | gastarbeiten

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s