getkeycodes: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On CentOS possible default full paths are:

/usr/bin/getkeycodes - from package: kbd

You may install the required package with command yum install {package}

On Debian possible default full paths are:

/usr/bin/getkeycodes - from package: kbd

You may install the required package with command apt-get install {package}
Error in other languages:
getkeycodes: bevel nie gevind nie
getkeycodes: comandă negăsită
getkeycodes: comando não encontrado
getkeycodes: commande introuvable
getkeycodes: command not found
getkeycodes: käsku ei ole
getkeycodes: không tìm thấy lệnh
getkeycodes: komanda nerasta
getkeycodes: Kommando nicht gefunden.
getkeycodes: kommandot finns inte
getkeycodes: komut yok
getkeycodes: nie znaleziono polecenia
getkeycodes: níor aimsíodh an t-ordú
getkeycodes: no se encontró la orden
getkeycodes: no s'ha trobat l'ordre
getkeycodes: opdracht niet gevonden
getkeycodes: parancs nem található
getkeycodes: perintah tidak ditemukan
getkeycodes: príkaz nenájdený
getkeycodes: příkaz nenalezen
getkeycodes: команда не найдена
getkeycodes: командата не е открита
getkeycodes: 命令找不到
getkeycodes: コマンドが見つかりません