keymap: move ModNameToIndex from text.c and use it in keymap.c Signed-off-by: Ran Benita <ran234@gmail.com>