Y yudinvs New Member Mar 14, 2024 #1 Hi all Please help I use software triggers to control Zebra Barcode Reader. i try to use Key_Down|Key_UP B4X: Copy Private Sub Activity_KeyUp (KeyCode As Int) As Boolean Return False End Sub it works, but then key press,. Now i need to turn it off on scan key Released, but no event raised B4X: Copy Private Sub Activity_KeyDown (KeyCode As Int) As Boolean Return False End Sub But Key Up Raises at key press, not release Key_Down not Raises. How to catch key down and key up events? Last edited: Mar 14, 2024
Hi all Please help I use software triggers to control Zebra Barcode Reader. i try to use Key_Down|Key_UP B4X: Copy Private Sub Activity_KeyUp (KeyCode As Int) As Boolean Return False End Sub it works, but then key press,. Now i need to turn it off on scan key Released, but no event raised B4X: Copy Private Sub Activity_KeyDown (KeyCode As Int) As Boolean Return False End Sub But Key Up Raises at key press, not release Key_Down not Raises. How to catch key down and key up events?
ilan Expert Licensed User Longtime User Mar 14, 2024 #2 i am not sure it is possible on android but maybe try using keycodes? B4X: Copy Sub Activity_KeyPress (KeyCode As Int) As Boolean 'Return True to consume the event 'Return True Select KeyCode Case KeyCodes.KEYCODE_DPAD_DOWN Case KeyCodes.KEYCODE_DPAD_UP End Select End Sub https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_DPAD_DOWN Upvote 0
i am not sure it is possible on android but maybe try using keycodes? B4X: Copy Sub Activity_KeyPress (KeyCode As Int) As Boolean 'Return True to consume the event 'Return True Select KeyCode Case KeyCodes.KEYCODE_DPAD_DOWN Case KeyCodes.KEYCODE_DPAD_UP End Select End Sub https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_DPAD_DOWN
Y yudinvs New Member Mar 14, 2024 #3 ilan said: i am not sure it is possible on android but maybe try using keycodes? B4X: Copy Sub Activity_KeyPress (KeyCode As Int) As Boolean 'Return True to consume the event 'Return True Select KeyCode Case KeyCodes.KEYCODE_DPAD_DOWN Case KeyCodes.KEYCODE_DPAD_UP End Select End Sub https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_DPAD_DOWN Click to expand... Sorry for my poor english, perhaps I wrote it wrong. I need to get evet at Key press and Key Release. At key press i want to turn barcode reader on, on Key Release turn off. Key code is same, but different events. Upvote 0
ilan said: i am not sure it is possible on android but maybe try using keycodes? B4X: Copy Sub Activity_KeyPress (KeyCode As Int) As Boolean 'Return True to consume the event 'Return True Select KeyCode Case KeyCodes.KEYCODE_DPAD_DOWN Case KeyCodes.KEYCODE_DPAD_UP End Select End Sub https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_DPAD_DOWN Click to expand... Sorry for my poor english, perhaps I wrote it wrong. I need to get evet at Key press and Key Release. At key press i want to turn barcode reader on, on Key Release turn off. Key code is same, but different events.
Y yudinvs New Member Mar 14, 2024 #4 My terminal has physical keyboard, physical scan key. Built in application ScanDemo or DataWedge can control reader on|off at key press/ key release Upvote 0
My terminal has physical keyboard, physical scan key. Built in application ScanDemo or DataWedge can control reader on|off at key press/ key release
ilan Expert Licensed User Longtime User Mar 14, 2024 #5 it looks like there is a key_down key_up event in android. https://developer.android.com/reference/android/view/KeyEvent i think you need to use java object for this. ACTION_DOWN and ACTION_UP see also this: How to make KeyDown and KeyUp on android device? I have a question. I'm making Keystroke dynamics app on android devices. For now, I make an Activity with measure string and EditText. I want to catch KeyDown and KeyUp events on software keyboa... stackoverflow.com Upvote 0
it looks like there is a key_down key_up event in android. https://developer.android.com/reference/android/view/KeyEvent i think you need to use java object for this. ACTION_DOWN and ACTION_UP see also this: How to make KeyDown and KeyUp on android device? I have a question. I'm making Keystroke dynamics app on android devices. For now, I make an Activity with measure string and EditText. I want to catch KeyDown and KeyUp events on software keyboa... stackoverflow.com
Y yudinvs New Member Mar 14, 2024 #6 thanx, but it's java, not b4x, to hard for me. i'm newborn in android. I'll try to figure it out, thanx again. Upvote 0
thanx, but it's java, not b4x, to hard for me. i'm newborn in android. I'll try to figure it out, thanx again.