The versatile 25-year-old is out of contract at Kenilworth Road and will be North End manager Graham Westley's 12th summer signing.
Deepdale chairman of football Peter Ridsdale said: "Keith has played over 250 career games and is still only 25.
"He is known as a midfielder but he made his name as a right-back and played there when Luton won promotion from League One to the Championship.
"He is a player who is very experienced and we are delighted to sign him.
"Graham has been tracking him for a while and he is a player he has always believed can do a job not just in League One but hopefully when we are promoted."