Keypad library, hold state?

I just can't seem to use it. I have my keypad rigged up, and displaying it onto a LCD screen. However I can't figure out how to use the hold function. I want to jog some motors and stuff when a key is held, and stop when it's released, but for some reason the keypad never registers a "HOLD" state. or I am using it wrong, here is my current attempt. the 0xDD plays a beeping sound. Ihad a while statement instead of IF, and once it started beeping it would never stop! not sure if that was a function of the keypad or the LCD, so I went IF, since I figured just keep guessing till I get it right. with this code I do see the "in switch" line, but never get inside the if statment

char key = kpd.getKey(); if(key) // Check for a valid key. Serial1.write(key); { switch (key) { case '': **Serial1.print("in switch"); if (kpd.getState()==HOLD){ **Serial1.print("in if"); delay(500); **Serial1.write(0xDD); **Serial1*.print("hold"); } break;

I could use some guidance, I don't want to have to use a ON key and OFF key

Just a WAG on my part, but that 500ms delay could be messing with the way the keypad library detects a "HOLD" state.

I'll toss it and cheeck

ok, pulling the hold if statement out of the switch made it work, so it seems the .getKey() is like the serial buffer, in that reading it clears it. so even tho the key is still held, the getKey returns?? null I guess, but getState does return HOLD. Also the key states probably don't update till loop() can, well, loop. which makes sense I guess? I never understood how the keypad can work in the background, and I guess the short answer is "It can't"

damn me and over thinking things