mds-kbdc: most of the built-in functions

Signed-off-by: Mattias Andrée <maandree@operamail.com>