-
-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keybard paste from clipboard when switching to the image doesn't work first time (need to paste a second time) #16700
Comments
Also others have confirmed P10 again with OSX (and I believe these are all arm macs - so not sure if processor has a bearing) |
I'm on Windows 10 and I have never seen this problem (pharo 10, 11). There's one with drag-and-drop (a short-cut to open Moose models) where the first click (after dropping onto Pharo and a dialog is opened) is ignored. I think it's related to the "drop" action not bringing Pharo to the front in Windows properly (it looks to be in front because the dialog opens). |
I've had this issue for years. Yes, I've been on MacOS the entire time, but I had/have the same issue on Intel Macs as well as my current M2. I've just really gotten used to clicking twice on a pharo widget before attempting to copy. I find this most when I'm trying to add my github packages to a new image. I need to copy my github URLs into the textEntry cell, and I click on the cell, attempt a paste, then click on it again - then paste again... then it works. Hope that helps! |
I'm glad it's not just me suffering this. I swear this wasn't something I noticed in older versions of Pharo - so will go back and check P9 and P8. I have also noticed in P12 that saving a method might have the same issue. When doing web development and flipping between a web browser to check results, several times now I've not seen my expected change and realised my change wasn't saved - which is reminiscent of the paste error. I need to confirm this as I would have successfully made some changes and it's just the save that didn't work. |
Pharo8 hadn't the issue. I don't know about Pharo9. Cheers
|
This is wierd, I loaded up an old P9 image (alongside my P12 image that had the problem when I opened this issue) to see for myself when this started happening. I copied some text from a web page, flipped to playground in P9 and it pasted fine. I flipped to P12 and I had to paste twice. I then tried it again and this time if failed in P9 and then worked in P12 - then it failed both times in both images, and then it worked fine lots of times. After experimenting a bit - I think you have to leave the image for 10 seconds or more, copy some text and then return to the image and it might fail. I don't think its a loss of focus, as I've had it happen a few times where I could press enter and see the cursor move, paste and fail and then paste again and it worked. So I haven't quite nailed the sequence that consistently makes this fail - but its annoying enough that it needs a fix - bit we need the guaranteed steps. |
Another example I've just had a few times now on P12 - I've switch to the image (after not using it for a few minutes), the cursor is flashing in a method browser, I've pressed paste (cmd-v) multiple times and its not worked, I've use the left/right arrows to move the cursor (and confirm I've got focus where I think I should) and then paste works fine. I've also noticed its not just cmd-v that fails, but also cmd-a (select all) or cmd-l to revert method changes. The arrow keys always seem to work and I suspect that a normal character key would as well - it seems to be meta keys that fail. |
I have so far been unable to reproduce this issue in P8 or in the latest GT image - however P9 and P12 both exhibit this issue. When I get the problem - continuing to press cmd-v (without releasing the cmd key) does not work - I have to release the cmd key, and then press cmd-v again and it will work. So I am suspecting that this is an issue with detecting the press of the cmd key - or understanding its current state - meaning that the key combination is ignored. I'm not sure what part the window gaining focus plays on this (and its worth saying I can replicate the problem when pharo is full screen mode or just a large window on the screen (so maximise doesn't play a part). I'm not sure if the timing between gaining focus and pressing cmd-v has any part in this - as I normally flip to pharo and then press cmd-v to paste something (I think the next thing is to see if I can replicate if I wait 2 seconds after flipping and then see if it will fail). |
Another observation - I've been able to repeat the problem on P9 and P12 several times now (it seems when it gets into this state, flipping to the image time and time again will reproduce the problem. After flipping, even if you wait 5 seconds and then press cmd-v it won't paste (repeatedly) until you release and then press cmd-v again. So its something about gaining window focus and detecting the first cmd keypress that goes wrong. Having repeated it now 5 times, I've then cmd-l reset the method pane I was pasting into and now its working fine every time I flip and paste - similarly in the other image, I've cleared the palyground, typed a few characters and then flipping and pasting is working every time. So it seems like something happens that gets it into this mode where its susceptible to missing the meta key press. Hopefully the above sequenes might shed some light on this. |
Hi, thanks you all so much for the report and the effort to show what is happening.
Releasing and pressing CMD+V starts working This is also happening when you do a CMD+TAB change and instead of accepting the new window by releasing the CMD key, you click in the icon. I have tracked the issue until an issue in SDL. |
I'm relieved that you have found a usecase - its been driving me bonkers thinking that maybe my keyboard was broken. I also appreciate you having a look as its not the simplest thing to track down - and its easy to just shrug shoulders and just fix something else. |
Many thanks for looking into this - to verify it has worked - will one of the current builds have this new sdl2 library and then I can replicated the steps above and confirm? |
@macta From what I understood you just need to update the VM and things should work |
Bug description
When you you copy some text from an email or webrowser and then switch to the image, select a playground or method source and peform meta-v (aka paste) the paste operation doesn't work the first time, you have to meta-v a second time for it to work.
To Reproduce
On a Mac running OSX 14.x
Expected behavior
The initial paste operation should just work
Screenshots
n/a
Version information:
Expected development cost
Unsure
Additional context
This has been confirmed to happen by other OSX users on the pharo list, but needs confirmation from Windows and Linux
The text was updated successfully, but these errors were encountered: