RMPR / atbswp

A minimalist macro recorder
GNU General Public License v3.0
717 stars 87 forks source link

Need help - azerty keyboard #89

Closed gui-lux closed 1 year ago

gui-lux commented 2 years ago

Checklist

Verbose log

#!/bin/env python3
# Created by atbswp v0.3.1 (https://git.sr.ht/~rmpr/atbswp)
# on 13 Jun 2022 
import pyautogui
import time
pyautogui.FAILSAFE = False

time.sleep(0.6133713150047697)
pyautogui.moveTo(207, 65)
time.sleep(0.08379147299274337)
time.sleep(1.4232727299968246)
time.sleep(0.003676260996144265)
time.sleep(0.002978334014187567)
time.sleep(0.0029565089935204014)
time.sleep(0.001885089004645124)
time.sleep(0.003181070991558954)
time.sleep(0.0018973480036947876)
time.sleep(0.0018872159998863935)
time.sleep(0.0010390910028945655)
time.sleep(0.001028633996611461)
time.sleep(0.0020948610035702586)
time.sleep(0.0019649140012916178)
time.sleep(0.0020572929934132844)
time.sleep(0.0018710540025494993)
time.sleep(0.0021020169951952994)
time.sleep(0.00197782700706739)
time.sleep(0.0007020479970378801)
time.sleep(0.002391147005255334)
time.sleep(0.0018803709972416982)
pyautogui.moveTo(210, 86)
time.sleep(0.0020315739966463298)
time.sleep(0.0019724589947145432)
time.sleep(0.0009395710076205432)
time.sleep(0.002016690996242687)
time.sleep(0.0019503110088407993)
time.sleep(0.0021708159911213443)
time.sleep(0.0010078610066557303)
time.sleep(0.000730567000573501)
time.sleep(0.0020781659986823797)
time.sleep(0.001947869997820817)
time.sleep(0.001954993000254035)
time.sleep(0.00197129299340304)
time.sleep(0.0020398000051500276)
time.sleep(0.0018754009943222627)
time.sleep(0.0020059790113009512)
time.sleep(0.0019657839875435457)
time.sleep(0.0021135340066393837)
pyautogui.moveTo(215, 107)
time.sleep(0.0021887290058657527)
time.sleep(0.0009660759969847277)
time.sleep(0.00200208299793303)
time.sleep(0.0020340259943623096)
time.sleep(0.00303109000378754)
time.sleep(0.0009324760030722246)
time.sleep(0.0009034300019266084)
time.sleep(0.0021687129919882864)
time.sleep(0.002796005006530322)
time.sleep(0.002169510000385344)
time.sleep(0.0010303320013917983)
time.sleep(0.0019470229890430346)
time.sleep(0.002118035001331009)
time.sleep(0.002939637008239515)
time.sleep(0.0018640069902176037)
time.sleep(0.001990207005292177)
time.sleep(0.002100601006532088)
time.sleep(0.002109166991431266)
time.sleep(0.0020329999970272183)
time.sleep(0.0019746820034924895)
time.sleep(0.002023048000410199)
pyautogui.moveTo(221, 129)
time.sleep(0.001959599001565948)
time.sleep(0.0008374570024898276)
time.sleep(0.0011336769966874272)
time.sleep(0.0019229839963372797)
time.sleep(0.0009729529992910102)
time.sleep(0.0010279380076099187)
time.sleep(0.002096480006002821)
time.sleep(0.000989334992482327)
time.sleep(0.0009876330004772171)
time.sleep(0.0008636010024929419)
time.sleep(0.0011949339968850836)
time.sleep(0.0009156769956462085)
pyautogui.moveTo(225, 150)
time.sleep(0.0009425330063095316)
time.sleep(0.0009975639986805618)
time.sleep(0.0009454079990973696)
time.sleep(0.00117459699686151)
time.sleep(0.0009279560035793111)
time.sleep(0.0009578659955877811)
time.sleep(0.001067372999386862)
time.sleep(0.0010145240084966645)
time.sleep(0.00103329899138771)
time.sleep(0.0007966570119606331)
pyautogui.moveTo(229, 171)
time.sleep(0.0012004649906884879)
time.sleep(0.000971702000242658)
time.sleep(0.0010014559957198799)
time.sleep(0.0009179760090773925)
time.sleep(0.0011581849976209924)
time.sleep(0.0008842469978844747)
time.sleep(0.0009497569990344346)
time.sleep(0.0009353600034955889)
pyautogui.moveTo(233, 193)
time.sleep(0.0012179899931652471)
time.sleep(0.000943927007028833)
time.sleep(0.0009600600023986772)
time.sleep(0.0008514679939253256)
time.sleep(0.0011096250091213733)
time.sleep(0.0010426859953440726)
time.sleep(0.000998952004010789)
pyautogui.moveTo(239, 214)
time.sleep(0.0009406239987583831)
time.sleep(0.0009282469982281327)
time.sleep(0.0011189450015081093)
time.sleep(0.001132933990447782)
time.sleep(0.0009482620080234483)
time.sleep(0.0008567420009057969)
time.sleep(0.0011276829900452867)
pyautogui.moveTo(245, 236)
time.sleep(0.0020196330006001517)
time.sleep(0.0009148480021394789)
time.sleep(0.0010617770021781325)
time.sleep(0.0008098139951471239)
time.sleep(0.0011420670052757487)
time.sleep(0.0009339560056105256)
time.sleep(0.0009894669929053634)
pyautogui.moveTo(250, 257)
time.sleep(0.0009851990034803748)
time.sleep(0.0010783530015032738)
time.sleep(0.0009402750001754612)
time.sleep(0.0011007510038325563)
time.sleep(0.0008910409960662946)
time.sleep(0.0010739499994087964)
time.sleep(0.0008808379934635013)
time.sleep(0.0011377300106687471)
time.sleep(0.0009511979878880084)
pyautogui.moveTo(260, 279)
time.sleep(0.0011040450044674799)
time.sleep(0.0007965520053403452)
time.sleep(0.0011218839936191216)
time.sleep(0.0010391880059614778)
time.sleep(0.0010095299949171022)
time.sleep(0.0008106349996523932)
time.sleep(0.001183996006147936)
time.sleep(0.0009931429958669469)
time.sleep(0.001028054000926204)
time.sleep(0.0009460949950153008)
time.sleep(0.0009366489975946024)
time.sleep(0.0009959650051314384)
pyautogui.moveTo(268, 300)
time.sleep(0.0009484750044066459)
time.sleep(0.0012378940009512007)
time.sleep(0.000922124003409408)
time.sleep(0.000998178991721943)
time.sleep(0.001971521007362753)
time.sleep(0.0010095170000568032)
time.sleep(0.002003422996494919)
time.sleep(0.0008621570013929158)
time.sleep(0.0010001479968195781)
time.sleep(0.0009968209924409166)
time.sleep(0.001161779000540264)
time.sleep(0.0008765240054344758)
time.sleep(0.0011091210035374388)
time.sleep(0.0009946729987859726)
time.sleep(0.0020544209983199835)
pyautogui.moveTo(278, 322)
time.sleep(0.0019738239934667945)
time.sleep(0.000978752999799326)
time.sleep(0.004012069999589585)
time.sleep(0.0020063360134372488)
time.sleep(0.0009755299979588017)
time.sleep(0.004041981999762356)
time.sleep(0.00702807899506297)
time.sleep(2.1779785380058456)
pyautogui.keyDown('&')
pyautogui.keyUp('&')
time.sleep(0.4231005030014785)
pyautogui.keyDown('é')
pyautogui.keyUp('é')
time.sleep(0.48796305699215736)
pyautogui.keyDown('"')
pyautogui.keyUp('"')
time.sleep(1.9282455640059197)
pyautogui.keyDown('enter')
pyautogui.keyUp('enter')
time.sleep(0.4959833859902574)
pyautogui.keyDown('a')
pyautogui.keyUp('a')
time.sleep(0.32002127400483005)
pyautogui.keyDown('z')
pyautogui.keyUp('z')
time.sleep(0.30387554099434055)
pyautogui.keyDown('e')
pyautogui.keyUp('e')
time.sleep(0.3919776030088542)
pyautogui.keyDown('enter')
pyautogui.keyUp('enter')
time.sleep(0.33610714400128927)
pyautogui.keyDown('q')
pyautogui.keyUp('q')
time.sleep(0.29594229700160213)
pyautogui.keyDown('s')
pyautogui.keyUp('s')
time.sleep(0.34395060999668203)
pyautogui.keyDown('d')
pyautogui.keyUp('d')
time.sleep(0.37608464299410116)
pyautogui.keyDown('enter')
pyautogui.keyUp('enter')
time.sleep(0.335962979006581)
pyautogui.keyDown('w')
pyautogui.keyUp('w')
time.sleep(0.3200266769999871)
pyautogui.keyDown('x')
pyautogui.keyUp('x')
time.sleep(0.36009223900327925)
pyautogui.keyDown('c')
pyautogui.keyUp('c')
time.sleep(2.2480142610002076)
pyautogui.keyDown('enter')
pyautogui.keyUp('enter')
time.sleep(0.35180241298803594)
pyautogui.keyDown('enter')
pyautogui.keyUp('enter')
time.sleep(2.008253174004494)
pyautogui.keyDown('shiftright')
time.sleep(0.9920619990007253)
pyautogui.keyDown('1')
pyautogui.keyUp('1')
time.sleep(0.3199243290000595)
pyautogui.keyDown('2')
pyautogui.keyUp('2')
time.sleep(0.3278413929947419)
pyautogui.keyDown('3')
pyautogui.keyUp('3')
pyautogui.keyUp('shiftright')
time.sleep(1.327996282998356)
pyautogui.keyDown('enter')
pyautogui.keyUp('enter')
time.sleep(0.5282551150012296)
pyautogui.keyDown('shiftright')
time.sleep(0.3518782380124321)
pyautogui.keyDown('A')
pyautogui.keyUp('A')
time.sleep(0.28788526899006683)
pyautogui.keyDown('Z')
pyautogui.keyUp('Z')
time.sleep(0.2801284160086652)
pyautogui.keyDown('E')
pyautogui.keyUp('E')
pyautogui.keyUp('shiftright')
time.sleep(0.5440403039974626)
pyautogui.keyDown('enter')
pyautogui.keyUp('enter')
time.sleep(0.44805040599021595)
pyautogui.keyDown('shiftright')
time.sleep(0.2798444440122694)
pyautogui.keyDown('Q')
pyautogui.keyUp('Q')
time.sleep(0.263982106000185)
pyautogui.keyDown('S')
pyautogui.keyUp('S')
time.sleep(0.27195899200160056)
pyautogui.keyDown('D')
pyautogui.keyUp('D')
pyautogui.keyUp('shiftright')
time.sleep(0.44003718199383)
pyautogui.keyDown('enter')
pyautogui.keyUp('enter')
time.sleep(0.49602573399897665)
pyautogui.keyDown('shiftright')
time.sleep(0.6241652879980393)
pyautogui.keyDown('W')
pyautogui.keyUp('W')
time.sleep(0.2879983640013961)
pyautogui.keyDown('X')
pyautogui.keyUp('X')
time.sleep(0.3041085090080742)
pyautogui.keyDown('C')
pyautogui.keyUp('C')
pyautogui.keyUp('shiftright')
time.sleep(2.8320048499881523)
pyautogui.keyDown('enter')
pyautogui.keyUp('enter')
time.sleep(0.43976241700875107)
pyautogui.keyDown('enter')
pyautogui.keyUp('enter')
time.sleep(1.5691785369999707)
time.sleep(0.002820320994942449)
time.sleep(0.01100809799390845)
time.sleep(0.006994846000452526)
time.sleep(0.009995667001930997)
time.sleep(0.03212008900300134)
time.sleep(0.024901059005060233)
time.sleep(0.08000263999565504)
time.sleep(0.0019772149971686304)
time.sleep(0.04300347600656096)

Miscellaneous information

Operating System

Ubuntu 20.04

Desktop Environment/Window Manager

Awesome WM

Python version

3.8.10

Description

Hi, first, I'm using an azerty (French) keyboard. And basically, what I typed : &é" aze qsd wxc

123 AZE QSD WXC

What it renders : !# qwe asd zxc

!@# QWE ASD ZXC

Please note I omitted unnecessary lines (time.sleep...) from the log. Thx

Vincent-vst commented 1 year ago

same problem here

RMPR commented 1 year ago

Thanks for reporting, this is currently a well-known issue with Autogui https://github.com/asweigart/pyautogui/issues/38 On the other hand, I tried to reproduce it locally but I can't. What I did is essentially switch my US layout to the french one and try to input problematic characters: aéèàç, but they were replayed correctly. On the other hand when I switch from one layout to another midplay: That is I record with the english one but when I replay I use the french one, that fails. Can you try to run the same recording but with the US layout and see if it solves your problem?

RMPR commented 1 year ago

I am now closing this issue, feel free to reopen if you have some more comments.