0

Whenever I call pygame.init(), the default English keyboard is added to my layout switcher. How can I prevent that? I have tried the answer here, but it doesn't help.

EDIT 2016/12/07: After further testing, I have determined that, of the six modules that pygame initializes in its init method, pygame.display.init is definitely at least partially to blame. import pygame.display as dsp; dsp.init() results in the addition of the layout. pygame_sdl2, however, does not exhibit this behavior, although I don't know whether that is simply because whatever part of the pygame.display module causes this hasn't been implemented yet or because of a meaningful difference in implementation.

  • Here, I think I fount a workaround/temporary solution http://stackoverflow.com/questions/13528951/pygame-keyboard-layouts-mixed-up – underscoreC Dec 06 '16 at 14:55
  • 1
    @C._ I'm asking about the keyboard being added to the language switcher, not checking for letters. It doesn't change the software layout, but it adds an unwanted option that I have specifically removed. – cuddlebugCuller Dec 07 '16 at 18:47

1 Answers1

0

Here, about changing the keyboard layout

PS: Sorry I can't reply directly to your comment. Don't have the ability to do that yet.

Community
  • 1
  • 1
underscoreC
  • 729
  • 6
  • 13
  • It's not a problem of *switching* layouts, it's a problem of *adding* an unwanted layout. – cuddlebugCuller Dec 10 '16 at 01:26
  • 1
    @cuddlebugCuller [try this](http://superuser.com/questions/395818/how-to-change-keyboard-layout-via-command-line-cmd-exe-on-windows-xp-7) – underscoreC Dec 15 '16 at 12:00
  • @cuddlebugCuller Sorry, accidentally hit enter. Go to that url, which shows how to delete keyboard layouts from cmd. Then, use this to run the code from python : `import os ` `command = [the code line that should be run from cmd]` `os.system(command)`. It's a little complex, but I think it should work. – underscoreC Dec 15 '16 at 12:05
  • Thanks. Unfortunately, this seems like something that MS seems to have not exposed. I tried the `control intl.cpl` thing and I tried just resetting the WinUserLanguageList directly with Powershell, but both seem to require a restart if they work at all. – cuddlebugCuller Dec 16 '16 at 16:40