What is the KeyCode for dot?

I’m using io.appium 6.1.0, selenium 3.13.0 and guava 24.0-jre.

There is a text field prefilled with a float number, which accepts only num characters and on clicking it, the num keypad is displayed. I need to clear the contents of the text field, but clear() is not working in this case, and neither is sendKeys(). I tried first using sendKeys() and then clear() and even that is not working.
The num keypad that I mentioned is not identified in UIAutomatorViewer.
So I tried to use:
((AndroidDriver)driver).pressKeyCode(67); - till the text inside the text field is gone,
and then I use:
((AndroidDriver) driver).pressKeyCode(AndroidKeyCode.KEYCODE_2);
which is anyways working,
[NOTE: Here, the pressKeyCode(AndroidKeyCode.KEYCODE_2) is striked, meaning it is deprecated. ]

The main issue is to give a decimal point in the text field. I have tried somehow to use the below instruction:
((AndroidDriver) driver).pressKeyCode(AndroidKeyCode.KEYCODE_PERIOD);
But this is locking the smartphone device.
Has anyone come across the need to enter a decimal point / dot in a text field without using sendKeys() ?
Would appreciate any help here. Thanks :slight_smile: