A matrix keypad is a
scanning device. It's an active process where one column [or row] is made active and the rows [or columns] are checked for a response. Then the next column is made active and the rows checked again. And the process continues. The keypad modules take care of all the heavy lifting for you.
Sparkfun has a good tutorial – skip down to
An Introduction to Matrix Scanning. Read this. Understand this.
A word about Swordfish Modules
Modules are used to add extended commands to Swordfish. To use a module, it is
included in your code:
Include "LCD.bas"
Include "utils.bas"
'INCLUDE "Keypad16pullup.bas"
Include "Convert.bas"
You don't copy anything from the module into your code. You call the functions of the module. For example,
DecToStr(MyVariable)
is a command made available in the Convert.bas module. The module is included in your code, but you don't copy and paste from the module into your code. For the most part (always, in your case), you don't change anything in the module itself.
Modules are not used like example code. They are finished, perfected code that doesn't need any "help."
You can't define an array of LEDs (or anything) to port pins. Swordfish does not support it.