I've used xmodmap to remap keys for bluetooth keyboard in Ubuntu 14.04:
xmodmap ~/.Xmodmap
remove mod1 = Alt_L
remove mod1 = Alt_R
keycode 180 = Alt_L
keycode 225 = Alt_R
add mod1 = Alt_L
add mod1 = Alt_R
But mappings reset next time bluetooth keyboard connects.
How to make mappings permanent or reenable them on connecting device?
Update:
I've found that going to tty and back to Xsession also breaks xmodmap settings, this line prevents breaking in tty case:
gsettings set org.gnome.settings-daemon.plugins.keyboard active false
but it's not an option since it breaks switching language layouts, while icon still shows language correctly. Reconnecting keyboard also resets xmodmap settings.