Simulate Click on Chromebook - google-chrome-extension

I am trying to create a Chromebook application that can map keyboard input to a screen click. Is there an API that enables you to simulate a click on your Chromebook in a desired position?
Example: A user presses 'A' on the keyboard and then the app simulates a screen click in the position 100(x), 120(y).
Thanks.

The answer is basically no.
There is no API to simulate input in other apps (such as your example). You would also not be able to capture keyboard outside very limited "global shortcut" input while another app is focused.

Related

Enabling keyboard shortcuts to confirm Dialogs in AppleScript

I am looking for a way to allow a user to complete a Dialog entry using keyboard shortcuts. Is this possible?
Other questions have discussed assigning shortcuts to the options in an AppleScript dialog box, but not to the "Continue"/"Okay" etc. button.
The main difficulty is that I'm using a multi-line text entry form, so the Enter button simply creates a new line, instead of targeting the default button as it would conventionally. I'm hoping cmdenter can be assigned to the default button instead.
The line of script defining the dialog in question is:
set theResponse to display dialog "Enter tasks:" default answer "
" buttons {"Cancel", "Continue"} default button "Continue"
Running your AppleScript code from Script Editor on a US English MacBook Pro, whether or not something is typed in, fnenter presses the Continue button.
The same keyboard shortcut works on an US English Apple Magic Keyboard when connected to the MacBook Pro and I'd assume any US English Mac it was connected to would do the same. I only have the MacBook Pro to test with at the moment.
In macOS, by default, pressing the tab key in this use case will not move between the controls as the controlling setting in System Preferences > Keyboard > Shortcuts is not set to allow it to act on all controls.
You must select one of the following options, depending on the version of macOS one is running, in order to use the tab key on all controls.
If you see:
Full Keyboard Access: In windows and dialogs, press Tab to move keyboard focus between:
(•) Text boxed and lists only
( ) All Controls
Select: (•) All Controls
If you see:
[] Use keyboard navigation to move between controls
Press the Tab key to move focus forward and Shift Tab to move focus backward.
Check: [√] Use keyboard navigation to move between controls
With this done, one can then use tabtabenter to press the continue button, with the dialog box produced by the code shown in the OP.
Side Note: One can also try fncommandenter as that was necessary from within a VMware macOS Catalina virtual machine that I also tested in.
⌘-Enter (on the numeric keypad) presses Continue
If you are in a multiline text field, hit the Tab key so that focus is on some element other than the text field. Then the Enter key should route properly to the dialog's default close button.

I have entered input but clicking on submit is again asking for input when running an automation through blue prism for browser based application

I am working on one web application. I am entering input in the text box, but when I click on Submit, I am again prompted to enter the input. How can I focus on the textbox or do a left click on the textbox before entering the text? I am trying to do this through blue prism.
Sometimes a web page can have Javascript code that detects keyboard events, and if it didn't detect any, it might think there's no input. Assuming that you have entered the input using a write stage before, you might need to use the Global Send Keys or Global Send Key Event actions instead (they should be available in the Navigate stage, and you use them on the TOP level element of the application model). Please note that prerequisites:
-The browser window will have to be active (Activate Application on the Win32 browser window element)
-The textbox should also be active (Click Centre on the textbox element)

Selfmade Keyboard show and hide Rad Studio Delphi 10.2 Tokyo

I built a cross platform application to run it on Android. I use a TEdit to get the numbers and a Label to show the result of the calculation.
(This function is already running).
Is there any way to show a calculator keyboard whenever I click into to an TEdit object?
It shouldnt just pop-up like a second form I built in.
Set the TEdit.KeyboardType property to either TVirtualKeyboardType.NumbersAndPunctuation or TVirtualKeyboardType.NumberPad as needed. When the user gives focus to the TEdit, it will display the OS's standard virtual keyboard in the appropriate layout.

How can I disable Chrome opening the Windows on-screen keyboard when debugging as iPad?

When I open the Chrome debug view and set the device to "iPad Mini" to simulate its screen size (and touch events), interacting with a text input causes the Windows on-screen keyboard to open.
This computer is not a tablet, and has never had a touch screen. In the Windows Ease of Access -> Keyboard settings Turns on the On-Screen Keyboard is off.
I can only assume that Chrome "simulating" an iPad Mini is causing Windows to think there's a touchscreen. I've been using this feature for a few months now, and the keyboard opening only started happening recently. I may have simply flipped a switch in the settings (of Chrome or Windows) on accident. If that's the case, I'd like to know how to flip it back!
This is frustrating because I have to close the keyboard each time as it covers up a large portion of the web-app.
The same page without the "iPad Mini" simulation does not open the keyboard:
(This keyboard also opens when choosing any device that has a touch screen, not just iPad Mini.)
Chrome doesn't emulate the keyboards of the device profiles you pick. An image of a keyboard will show for certain ones, like the iPhone 5X, but it is non-functional and is just present to allow you to see how the various elements on the page respond to the keyboard. You can see my answer here for more details on viewing that. However, this is not the same keyboard you are seeing.
It looks as though there is something in Windows, which is triggering the on-screen keyboard. I'm not sure why it would still appear if you have it disabled, but you could try a couple of things, based on what I've found online:
Make sure 'Touch Keyboard and Handwriting Panel Service' is set to disabled in Services (services.msc)
SetLOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\ ShowTabletKeyboard from value 1 to 0 (regedit.exe)
Check there is no other 3rd party software running, which may affect your keyboard behaviour.

X11 and fake keyboard / mouse events

I want to know as to how do you detect if a key press event or a mouse pointer event has been generated by an (automation like) application like xdotool. Basically, I am writing an application to check if there is no real mouse or keyboard activity. In my application I want to flag idle activity only if we don't have real mouse movement or real key press/release on the keyboard. Any reference regarding this would be great. I want to do this using pure xlib API. Don't want to use XCB. Any extensions such XRecord(which I am currently using to capture events) are fine.
Thanks in advance.
Yes there is a possibility.
All X11-events which are relevant for mouse movements and clicks have a member called "send_event".
It is set to "True" if the event was sent by an application. It is "False" if it was generated by the X-Server, i.e. by a user action.
If xdotool uses SendEvent for mousclick simulation than you'll be able to detect that using the "send_event" member.

Resources