The dev->getkeycode() method expects unsigned argument. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>