Programable Keyboards with Onboard Memory
Here is list of programable keyboards with onboard memory. I only list practical ones that's currently commercially made.
See also: Why Programable Keyboards Are Better Than Software Key Remap
Note, gaming keyboards are usually not fully programable.
Note: many gaming keyboards, in particular those by Razer and Corsair, require you to have internet connection (they call it cloud) for your customized keys to work. Often, the keyboard won't even work as a basic keyboard when used with Linux.