get_indev() function
Find an indev preferably with KEYPAD or ENCOEDR type that uses the given group. In other words, find an indev, that is related to the given group. In the worst case simply return the latest indev
Arguments
g
a group the find in the indevs
Return value
the suggested indev