Appuyer sur une touche

Vous voulez de l'aide ? Postez ici :)
Post Reply
logost
Posts: 12
Joined: 05 Sep 2020, 09:46

Appuyer sur une touche

Post by logost »

Bonjour je debut tout juste avec actiona, et je n'arrives pas a faire une chose toute bete c'est d'appuyier sur les touches nurmerique du clavier au dessus des touches azerty (&é"'(-).
Sa na pas l'air possible directement mais peut etre avec tu code JS et je ne sais pas quoi? Si quelqu'un a une idee merci.
eureka
Posts: 204
Joined: 08 Mar 2016, 22:18

Re: Appuyer sur une touche

Post by eureka »

OS is .. Windows or Linux?
You have tried Key: F1 ?
logost
Posts: 12
Joined: 05 Sep 2020, 09:46

Re: Appuyer sur une touche

Post by logost »

Hi, i'm on windows. F1,F2... works but not the keys above azerty.
eureka
Posts: 204
Joined: 08 Mar 2016, 22:18

Re: Appuyer sur une touche

Post by eureka »

Perhaps .. test with virtual keyboard

https://support.microsoft.com/en-us/win ... close%20it.
logost
Posts: 12
Joined: 05 Sep 2020, 09:46

Re: Appuyer sur une touche

Post by logost »

Virtual keyboard doesn't work, maybe you know how to rebind a key value?
eureka
Posts: 204
Joined: 08 Mar 2016, 22:18

Re: Appuyer sur une touche

Post by eureka »

I am more familiar with Ubuntu 20.04 (although I do have Windows 10 as a secondary boot).

Intuitively I would try using tools in concert with Actiona in a toolchain.

In my Windows 10 I have installed Listary and from memory you can map to key combinations.

Basically if you can do this through command line, you can use Actiona to orchestrate other tools such as Listary.
Think of Actiona as the conductor of an orchestra.
Many tools can be run through command line. Exploit this through Actiona > Command.

But this does not explain why your keys are not recognised.

Another approach would be to call a Python script which operates on keys. In this case you would use Command object in Actiona - not Key.

In Ubuntu 20.04 I can call on xdotool through command line.
logost
Posts: 12
Joined: 05 Sep 2020, 09:46

Re: Appuyer sur une touche

Post by logost »

ok i will look for tools like Listary.
I try SharpKeys to change the map key from window but i have to restart computer every change so it's annoying. like that :
sharpkey.JPG
sharpkey.JPG (51.65 KiB) Viewed 1557 times
But maybe is there a way to set up a key from Actiona, some how like that?
The attachment a key.JPG is no longer available
Attachments
a key.JPG
a key.JPG (38.55 KiB) Viewed 1557 times
eureka
Posts: 204
Joined: 08 Mar 2016, 22:18

Re: Appuyer sur une touche

Post by eureka »

AutoHotkey should do it ..

https://www.makeuseof.com/tag/10-cool-a ... ipts-make/

but I will have to jump out of Ubuntu to try it ... some time later.

Also .. are you aware that in Windows 10 you can run WSL (Windows Subsystem Linux)
where you can run Linux scripts?

[Added note] There is this blog explaining how to use python script.

https://nitratine.net/blog/post/simulat ... in-python/

Actiona can then run python script(s) through Command object.
Args (keys) can be passed.
MDLE46
Posts: 108
Joined: 11 Nov 2016, 19:06

Re: Appuyer sur une touche

Post by MDLE46 »

Bonjour Logost,

Une solution, faire avec l'émulateur de clavier Skeys et les codes caractères ascii.
Lien pour télécharger skeys.exe : http://mclaveau.com/batch/util.html#315
lien pour ASCII table , ascii codes : https://theasciicode.com.ar/

Cordialement.

MDLE46
logost
Posts: 12
Joined: 05 Sep 2020, 09:46

Re: Appuyer sur une touche

Post by logost »

MDLE46 du coup skeys.exe va me permetre d'ecrire mais pas de simuler une touche, du moins je n'ai pas reussi avec. merci quand meme.

So eureka i try the python scrip and it's work now how can i use it on actiona?
doesn't seems to work
cmd.JPG
cmd.JPG (22.89 KiB) Viewed 1527 times
eureka
Posts: 204
Joined: 08 Mar 2016, 22:18

Re: Appuyer sur une touche

Post by eureka »

In the Command object window you have:

Command:
Parameters:
Working Directory:

In a terminal type: python3 --help
and you can see how python3 uses command line strings.

In the Command field simply type your python alias: python3 .. do not add a long path
In the Parameters field type the name of the file .. test.py
In the working Directory field type the path to the file .. but without file name.
c:/Users/Dicky/Desktop/opencv_tutorials-master/001_intro/

Incidentally should that be open_tutorials_master .. for consistency "_" or "-" ???
____________________________________^

If you click on the "lifebelt" red/white circular icon to the left of the Cancel button you are linked to the documentation for each Qt object; in this case Command object.

Finally a tip. You can embed your python script in top bar > Script > Resources.
Then you do not need a working directory - the file is local resource.
logost
Posts: 12
Joined: 05 Sep 2020, 09:46

Re: Appuyer sur une touche

Post by logost »

here we go !! it's seems good. thx a lot for this help.
Post Reply