Make matrix_kb more resilient.
Make matrix_kb more resilient.

Jepler noticed that out-of-range keycodes caused segfaults. This commit checks the
range of r and c more carefully.

Signed-off-by: Andy Pugh <e3579b1e47f273529f0f929453e939a68ede9fd1@bodgesoc.org>

narogon/linuxcnc,RunningLight/machinekit,cdsteinkuehler/MachineKit,unseenlaser/linuxcnc,narogon/linuxcnc,mhaberler/machinekit,bobvanderlinden/machinekit,bmwiedemann/linuxcnc-mirror,unseenlaser/machinekit,ianmcmahon/linuxcnc-mirror,bobvanderlinden/machinekit,Cid427/machinekit,EqAfrica/machinekit,cdsteinkuehler/MachineKit,narogon/linuxcnc,mhaberler/machinekit,unseenlaser/linuxcnc,cdsteinkuehler/linuxcnc,RunningLight/machinekit,EqAfrica/machinekit,strahlex/machinekit,ianmcmahon/linuxcnc-mirror,ikcalB/linuxcnc-mirror,mhaberler/machinekit,mhaberler/machinekit,aschiffler/linuxcnc,bmwiedemann/linuxcnc-mirror,narogon/linuxcnc,cdsteinkuehler/linuxcnc,EqAfrica/machinekit,aschiffler/linuxcnc,ArcEye/machinekit-testing,bobvanderlinden/machinekit,bmwiedemann/linuxcnc-mirror,EqAfrica/machinekit,araisrobo/machinekit,bobvanderlinden/machinekit,mhaberler/machinekit,RunningLight/machinekit,strahlex/machinekit,strahlex/machinekit,bobvanderlinden/machinekit,mhaberler/machinekit,unseenlaser/machinekit,kinsamanka/machinekit,RunningLight/machinekit,strahlex/machinekit,unseenlaser/machinekit,bmwiedemann/linuxcnc-mirror,cdsteinkuehler/linuxcnc,narogon/linuxcnc,unseenlaser/machinekit,bmwiedemann/linuxcnc-mirror,ianmcmahon/linuxcnc-mirror,mhaberler/machinekit,kinsamanka/machinekit,ArcEye/MK-Qt5,ikcalB/linuxcnc-mirror,ikcalB/linuxcnc-mirror,aschiffler/linuxcnc,ArcEye/machinekit-testing,EqAfrica/machinekit,ArcEye/machinekit-testing,araisrobo/machinekit,unseenlaser/machinekit,RunningLight/machinekit,araisrobo/machinekit,ArcEye/machinekit-testing,EqAfrica/machinekit,ikcalB/linuxcnc-mirror,EqAfrica/machinekit,bmwiedemann/linuxcnc-mirror,bobvanderlinden/machinekit,unseenlaser/machinekit,cdsteinkuehler/linuxcnc,aschiffler/linuxcnc,ikcalB/linuxcnc-mirror,ikcalB/linuxcnc-mirror,bobvanderlinden/machinekit,araisrobo/machinekit,kinsamanka/machinekit,ArcEye/MK-Qt5,unseenlaser/linuxcnc,Cid427/machinekit,araisrobo/machinekit,ianmcmahon/linuxcnc-mirror,strahlex/machinekit,ArcEye/MK-Qt5,ianmcmahon/linuxcnc-mirror,mhaberler/machinekit,EqAfrica/machinekit,strahlex/machinekit,Cid427/machinekit,aschiffler/linuxcnc,unseenlaser/linuxcnc,RunningLight/machinekit,kinsamanka/machinekit,Cid427/machinekit,unseenlaser/machinekit,araisrobo/machinekit,kinsamanka/machinekit,Cid427/machinekit,ikcalB/linuxcnc-mirror,araisrobo/machinekit,RunningLight/machinekit,ArcEye/machinekit-testing,cdsteinkuehler/MachineKit,cdsteinkuehler/MachineKit,ArcEye/MK-Qt5,ArcEye/MK-Qt5,ArcEye/machinekit-testing,cdsteinkuehler/MachineKit,unseenlaser/linuxcnc,kinsamanka/machinekit,ArcEye/MK-Qt5,cdsteinkuehler/linuxcnc,strahlex/machinekit,ArcEye/MK-Qt5,araisrobo/machinekit,bmwiedemann/linuxcnc-mirror,cdsteinkuehler/linuxcnc,Cid427/machinekit,kinsamanka/machinekit,cdsteinkuehler/MachineKit,ArcEye/machinekit-testing,ianmcmahon/linuxcnc-mirror,RunningLight/machinekit,unseenlaser/machinekit,kinsamanka/machinekit,bobvanderlinden/machinekit,ArcEye/MK-Qt5,Cid427/machinekit,ianmcmahon/linuxcnc-mirror,araisrobo/machinekit,Cid427/machinekit,ArcEye/machinekit-testing