Media keys behaving like function keys

Solution 1:

Ugh. I hate when the solution is "it just stopped happening all of a sudden"... but a firmware update came out and I installed it, and now my keys back! Yay =D

If I learn anything about what exactly happened here I'll post my findings.

Solution 2:

tell application "System Preferences"
    reveal anchor "keyboardTab" of pane "com.apple.preference.keyboard"
end tell
tell application "System Events" to tell process "System Preferences"
    click checkbox 1 of tab group 1 of window 1
end tell
quit application "System Preferences"

I have also found one quick fix from here