使用python更改键盘语言 [英] change keyboard language using python

查看:212
本文介绍了使用python更改键盘语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
我想将python中的键盘语言从英语更改为阿拉伯语,例如我有两行编辑,用英语写第一行,当移至第二行时,编辑语言将自动为阿拉伯语.

hello ,
i want to change keyboard language from english to arabic in python , like i have two line edit , write on first one in english and when move to second line edit language will be arabic automatically ??

推荐答案

我建​​议不要尝试.如果安装了两种以上的语言,则用户知道如何更改输入语言.如果没有任何切换该怎么办?最好将其留给用户.

—SA
I would advice not to try it. The user knows how to change input language if there are more than two languages installed. What if there is nothing to switch? It''s the best to leave it to the user.

—SA


安装此软件包:
win32api.exe
然后
################################################ #######
导入win32api
win32api.LoadKeyboardLayout(''00000401'',1)#切换到阿拉伯语
win32api.LoadKeyboardLayout(''00000409'',1)#切换到英语
install this package :
win32api.exe
then
#########################################################
import win32api
win32api.LoadKeyboardLayout(''00000401'',1) # to switch to arabic
win32api.LoadKeyboardLayout(''00000409'',1) # to switch to english


这篇关于使用python更改键盘语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆