8000 It dont save my shortcuts · Issue #1369 · pyscripter/pyscripter · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

It dont save my shortcuts #1369

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

Closed
Penelopen opened this issue Mar 3, 2025 · 19 comments
Closed

It dont save my shortcuts #1369

Penelopen opened this issue Mar 3, 2025 · 19 comments
Labels

Comments

@Penelopen
Copy link
Penelopen commented Mar 3, 2025

If I go Tools - Customize IDE shortcuts - Source code and Assign Toggle comment with Ctrl+/, then it works fine, but if I reopen PyScripter, then it not work!

If I assign Toggle comment with Ctrl+' or any other, then it works fine and after reopen PyScripter works fine too, BUT after restarting PC it not works!

@Penelopen
Copy link
Author
Penelopen commented Mar 3, 2025

Maybe I can importing my shortcuts.ini everytime at PyScripter starts? What I should write in pyscripter_init.py?

@pyscripter
Copy link
Owner

BUT after restarting PC it not works!

Are you sure? This is hard to explain.

@Penelopen
Copy link
Author

Sure. I was try it ~5 times. And I cant explain this too. You can try it yourself

@Penelopen
Copy link
Author

I can make a video for you

@pyscripter
Copy link
Owner

I believe you. I will look into it.

@Penelopen
Copy link
Author

Anyway maybe I can importing my shortcuts.ini automatically everytime at PyScripter starts? What I should write in pyscripter_init.py?

@pyscripter
Copy link
Owner

You could

  • create a copy of PyScripter.ini from the downloaded version
  • create a command file that copies the saved copy over the current pyscripter.ini and then starts PyScripter
  • Start PyScripter by executing this command file

@pyscripter
Copy link
Owner

I have setup a virtual machine with russian language but I still cannot reproduce either of the issues you face (shortcuts and remote engine output).

What do you get when you run the following python script:

import locale

# Get the current locale's code page
code_page = locale.getpreferredencoding()
print(f"Current code page: {code_page}")

import ctypes

# Get ANSI code page (used by Windows GUI apps)
ansi_code_page = ctypes.windll.kernel32.GetACP()
print(f"ANSI code page: {ansi_code_page}")  # e.g., 1252

# Get OEM code page (used by command prompt)
oem_code_page = ctypes.windll.kernel32.GetOEMCP()
print(f"OEM code page: {oem_code_page}")  # e.g., 437 (US) or 850 (Western Europe)

In my russian virtual machine I get:

Current code page: utf-8
ANSI code page: 1251
OEM code page: 866

@Penelopen
Copy link
Author

What do you get when you run the following python script:

Current code page: cp1251
ANSI code page: 1251
OEM code page: 866

@Penelopen
Copy link
Author
Penelopen commented Mar 6, 2025

Now I have same problems again...

  • After restart my PC, default Ctrl+' not working again
  • I look in settings and found that Toggle Comment shortcut not assigned

Image

  • I assign it to default Ctrl+' and it works fine until next restart PC
  • I move this ZIP version of PyScripter to C:/ or C:/Users/User/PyScripter and nothing happens
  • I Downloaded PyScripter-5.2.1-x64.zip
  • Then extracted the zip file on C:/
  • Runned this super new super clear PyScripter from inside the expanded zip file.
  • Tried Ctrl+' and it NOT WORKED too. And in this just downloaded version settings, Toggle Comment shortcut also not assigned.

It seems that Windows remember some settings..

@Penelopen
Copy link
Author

Saved copy of the clear(default) pyscripter.ini of just downloaded PyScripter didnt help((

@Penelopen
Copy link
Author
Penelopen commented Mar 6, 2025

You could

* create a copy of PyScripter.ini from the downloaded version

* create a command file that copies the saved copy over the current pyscripter.ini and then starts PyScripter

* Start PyScripter by executing this command file

So that not helps me((

I exported all hotkeys to myhotkeys.ini
How I can automatically import this file every time at PyScripter run?

@pyscripter
Copy link
Owner

I have fixed the issue of removed editor shortcuts reappearing.
I now need to understand what is happening with the IDE shortcuts.

Is this the keyboard you are using?

image

@Penelopen
Copy link
Author

Is this the keyboard you are using?

Yep))

@pyscripter
Copy link
Owner
pyscripter commented Mar 7, 2025

Here is what I found using my Russian Virtual machine.

Using keyboard layout:

image

Using Russian keyboard layout.

image

When I exit with with Russian keyboard layout active PyScripter.ini contains:

image

When I exit with with English keyboard layout active PyScripter.ini contains:

image

So how the shortcut is saved depends on what keyboard layout was active when you exit PyScripter!

To be continued.

@pyscripter
Copy link
Owner

I think I fixed it.

Please download this zip file.

It contains PyScripter.exe. Replace your PyScripter.exe with the one in the zip file and test it.

Please test both:

  • Shortcuts
  • The Abort command (use the remote python engine).

@Penelopen
Copy link
Author
  • The Abort command (use the remote python engine).

The Abort command works fine on this code and program not freezed with this code:

while True:
     print('Hello')

Shortcuts still blow my mind))

  • I reassigned Fold Nearest shortcut from Ctrl+/ to Ctrl+Alt+/
  • Then I reassigned Toggle Comment shortcut from Ctrl+' to Ctrl+/ (i like that hotkeys)
  • It worked until the PyScripter was closed
  • Runned PyScripter again and Ctrl+/ NOT WORKS

@pyscripter
Copy link
Owner
pyscripter commented Mar 7, 2025

This time I am sure I fixed it.

New zip file with updated PyScripter.exe.

Thanks for helping to make PyScripter better!

Technical note. The Ctrl+/ is a special case since there are two shortcuts with the same representation The keyboard / and the numpad / and PyScripter was erroneously converting the first to the second.

@Penelopen
Copy link
Author

At last it works great! ))) Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants
0