New keymap implementation. Changes in lib.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>