Matrix Keypad Lib - Rows/Columns?

Just wondering.. is it output->row, column->input(+grnd)... OR.. is it output->column, row->input(+grnd)?

Just realised, perhaps this would go in hardware interfacing..? It's kind of a grey area.. a software problem causing a problem with interfacing hardware.... :o

My 4x4 velleman keypad is set up like this

// set up the Keypad
const byte ROWS = 4; // Four rows
const byte COLS = 4; // Four columns

// Define the Keymap
char keys[ROWS][COLS] = 
{
  {    '1','2','3','A'      }  ,  // row 1
  {    '4','5','6','B'      }  ,  // row 2
  {    '7','8','9','C'      }  ,  // row 3
  {    '*','0','#','D'      }  ,  // row 4
};

// Connect keypad ROW1, ROW2, ROW3 and ROW4 to these Arduino pins.
byte rowPins[ROWS] = { 6, 5, 4, 3  };  // Keypad uses internal pullups? No externals supplied
// these pins have separate external Diodes, anodes connected to Pin2 (Int0)
// Column pins are set low just before shut down,
// and Pin2 is pulled high internally.
// Pressing a Row button connects to a Low Columna and pulls the appropriate Row Diode Low for a Pin2 Low interrupt.
// Column pins are then set back high for the keypad library button determination.

// Connect keypad COL1, COL2, COL3, COL4 to these Arduino pins.
byte colPins[COLS] = { 10, 9, 8, 7 }; 

// Create the Keypad
Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );

Thankyou! That is a great help that you included the 'connect x to x pin' bit in your comments..

Yes, glad I could help. I like to add lots of comments about what I have found out/figured out as I go. Makes it easier to modify later when I want to make performance changes or re-use the code for something else.
Or share with others.

I recently had the TAB feature explained, so I have been breaking up my sketches into several tabs. To make them show up in order across the top of the IDE:
a_comments
b_presetup
c_setup
d_void_loop
e_other stuff (such as pitch.h if using Tone)

If my void is really big, I may split it up. If I ever get around to using functions, I'll probably put those in separate tabs.

The only catch is that I have to play around with adding an extra } at the botto of a tab to make autoformat work, then have to remember to take it out again when compiling.