(USB keyboard + keyboard+lcd +due) using facing problem of getting same output

And to if what @johnwasser suggested doesn't work, add try adding in a simple button denounce code before the keypressed() or getOemKey(). Just another thought to consider although I agree with John, I think it is reading the key depression and release.