Is there a way to toggle the Fn key? I'd like to be able to toggle it so I don't have to press Fn+F12 to raise the volume, for example.
Toggle Key: A toggle key is a key that is used to turn a function on or off, or to switch between two functions. Examples of toggle keys are the caps lock key, number lock key and scroll lock key. A toggle key can also be used as an accessibility option to alternate the input mode of keys.
As far as I know, the Fn key does not get detected by the OS but modifies your other keys on a firmware level. That means you can neither retrieve nor control the state of the Fn key from Ubuntu.
What you could do instead is to change the keyboard shortcut for increasing/decreasing audio volume to an alternative key combination instead of the Fn-modified special key.
Open System Settings → Keyboard and go to the Shortcuts tab. In the list on the left side, select Sound and Media.
After clicking on an entry in the list on the right side (in your case you want to edit Volume up and Volume down), you can press a combination of keys you want to assign to this shortcut. Esc cancels the editing and ← Backspace disables the shortcut.
My laptop has a Fn Lock key which is useful, except when it's been pressed by accident. Then pressing F5 in Firefox doesn't reload the page; it switches off the touch pad. I now know what it is but it had me totally bamboozled having to reboot or logout to get the touch pad back working.
If you have an Apple keyboard and want to function keys act like F1-F12 by default (disable Fn default behavior) give the following command in terminal:
echo 2 | sudo tee /sys/module/hid_apple/parameters/fnmode
from here: https://help.ubuntu.com/community/AppleKeyboard#Change_Function_Key_behavior