but i read in some thread that it can be done without diode by setting the OUTPUT to HIGH instead of LOW. Can you please reconfirm?
Without the diodes the switches short the pins together. I can't think of any way to distinguish between the the button that shorts A to B and the button that shorts B to A.
Even if you add pull-down resistors on all of the pins and use HIGH output instead of LOW you would have the same problem. I still can't think of a way to distinguish between the the button that shorts A to B and the button that shorts B to A.
If you can provide a pointer to the thread that told you that you don't need diodes in your keypad design then I'd like to see how they explain how to do it.
I see how you could double the number of buttons by adding a pin: having diodes in both directions. The added pin would switch some resistors between pull-up and pull-down so half the keys can be sensed with a LOW drive (and pull-ups) and the other half with a HIGH drive and pull-downs.