This may be on the bleeding edge, but there is a Linux kernel driver for Corsair Kxx that is currently under active development. The base is Corsair K90, but there are reports for the Corsair K40. It might work for the Corsair K30.

A feature worth mentioning is:

Remapping G keys so they send proper key codes.

An alternative is the K65/K70/K95 RGB Unofficial Driver for Linux and OS X, but it seems to be for the RGB editions only. It is on GitHub, though.

Note: I don't know about the Corsair K30, but for the Corsair K95 RGB the G-keys do not work because they are not executed in the keyboard itself, but by software in the operating system (only intended to be Windows).