Using COM-08653 (12 Button Keypad) as simple buttons on microcontroller

Okay. Read through the examples and thought up of a situation I may run into. In my loop, after I defined my keys (as shown in the tutorial), if I decided to consider using "if" statements, and my approach is to say "if, at a point in time, I press and hold '4' on the keypad, then the if statement will follow through in my loop"

for example:

void loop()
{

char key = kpd.getKey();
    if(key == ‘4’)
  {    
      // My specific command
  }

^^
Would this theoretically work until I release the '4' key?