By default, function keys (i.e., F1 to F19) of Apple aluminum keyboard are multimedia special keys, e.g., setting screen brightness or speaker volume. If you want to press a real function key, you need to press a function and the fn key above delete key.
But, as a programmer who uses IDEs a lot, I don't wanna press fn - i don't wanna play piano on my computer keyboard.
So, I googled around and found out the very easy solution at Ubuntu Wiki. https://help.ubuntu.com/community/AppleKeyboard
I have tried it out and it worked as expected.