I think the Visicom COM-100 uses the 4 to 16 line decoder TC4515 to decode the 20 keys. The lower 4 bits of OUT 2 are used as input selecting one of the 16 outputs of the TC4515. 10 of the outputs are connected to both keypads (keys 0 to 9). The keys on the left keypad are connected to the EF3 flag and on the right keypad to the EF4 flag. The Visicom software checks the keys by stepping OUT 2 from 0 to 9. After every OUT, EF3 and EF4 are checked and if equal to 0 the key representing the last OUT 2 and EF was pressed.
I assume the joysticks are connected the same way as the keypads.