we had a good discussion abt 8255 ports and pins . thanks friends.
but i have found the shortest way for solving my fundamental problem. and that is--> to use the switches in matrix form. i can use as many switches i like if thay are in matrix. and the output too i suppose. thanks any way.
Thtat is the traditional method to implement at least smaller keyboards - few people want to loose one pin/key :)
More high-end keyboards can use other detection techniques to allow multi-rollver detection.