I don't know where Ubuntu package for this is exactly, but Gnome (specifically Gnome-Shell) has a standard UI component for this that suits your requirements exactly.
It is usually accessed through the panel keyboard layout widget, but if it exists on the system you can call it directly from any DE, including unity. Just call up the gkbd-keyboard-display
app. You will need to pass it an argument of the layout name you want to view. For example for the standard US English layout:
gkbd-keyboard-display -l us
If you don't know the name of your layout, you can use setxkbmap -query
to find it. To view your current layout whategkbd-keyboard-display -l $(setxkbmap -query | sed -n '/^layout/ {s/.*: *//g;p}')ver it may be, try:
gkbd-keyboard-display -l $(setxkbmap -query | sed -n '/^layout/ {s/.*: *//g;p}')
The app will show you the current layout including what you will get with modifier keys and show you what keys you are currently pressing. It does not act as an on-screen keyboard to enter keystrokes via the mouse, it only shows you info about the keyboard layout.