longPressKeyCode - Press and Hold

Hi, I am currently using longPressKeyCode (I am using Java) to press the R1 hardware button on my Android device. This causes the device to activate a bar code scanner, however, calling this command through Appium merely makes it flash. This is too short to actually pick up the barcode. Is there a function that will hold down the specified KeyCode?