Python Forum
Asking users to create keyboard shortcuts
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Asking users to create keyboard shortcuts
#1
I'm writing the best Latex generating Python program ever, but I'm using special characters that you plobably don't have natively on your keyboard layout, namely
>>> "\u00AB\u00BB\u00A6\u2026"
'«»¦…'
I use a Bépo layout, so these characters are immediately available to me.

I intend not to be the sole user of this program, so if I distribute it one day or the other, I will probably require that users be able to enter these characters in their documents. My question is Suppose a program requires you to enter the characters « ¦ » or …, would that be a serious problem to you, considering your OS or your favorite editor ?

For example, let's take users with a Linux/KDE setup without « on their keyboard. They could define a global shortcut that would run the command
Output:
python3 -c 'from pynput.keyboard import Controller; Controller().type("\u00ab")'
I tested this and it works well, furthermore, it looks multiplatform, so if you are able to define global shortcuts, it may work for you too.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020