fixed error message when using en_US locale,
added new cmd line parameter '-lang', added some templates for Auto-Type (still incomplete) git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@77 b624d157-de02-0410-bad0-e51aec6abb33
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
#include "AutoType.h"
|
||||
#include <QList>
|
||||
#include <QChar>
|
||||
/* { 0x05c7, 0x0627 }, Arabic_alef ا ARABIC LETTER ALEF */
|
||||
|
||||
|
||||
QWidget* AutoType::MainWin=NULL;
|
||||
|
||||
@@ -102,13 +102,13 @@ for(int i=0;i<str.size();i++){
|
||||
}
|
||||
|
||||
|
||||
|
||||
MainWin->hide();
|
||||
Display* pDisplay = XOpenDisplay( NULL );
|
||||
for(int i=0;i<Keys.size();i++){
|
||||
int keycode=XKeysymToKeycode(pDisplay,Keys[i]);
|
||||
int mods=getModifiers(pDisplay,Keys[i],keycode);
|
||||
pressModifiers(pDisplay,mods);
|
||||
qDebug("[%i]: Keysym=%i, KeyCode=%i, Mod=%i",i,(int)Keys[i],keycode,mods);
|
||||
XTestFakeKeyEvent(pDisplay,keycode,True,0);
|
||||
XTestFakeKeyEvent(pDisplay,keycode,False,1);
|
||||
releaseModifiers(pDisplay,mods);
|
||||
@@ -169,6 +169,50 @@ if(!tmpl.compare("esc")){
|
||||
if(!tmpl.compare("help")){
|
||||
keys << XK_Help;
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("home")){
|
||||
keys << XK_Home;
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("ins")){
|
||||
keys << XK_Insert;
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("numlock")){
|
||||
keys << XK_Num_Lock;
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("scroll")){
|
||||
keys << XK_Scroll_Lock;
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("pgdn")){
|
||||
keys << XK_Page_Down;
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("pgup")){
|
||||
keys << XK_Page_Up;
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("prtsc")){
|
||||
keys << XK_3270_PrintScreen;
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("up")){
|
||||
keys << XK_Up;
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("down")){
|
||||
keys << XK_Down;
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("left")){
|
||||
keys << XK_Left;
|
||||
return;}
|
||||
|
||||
if(!tmpl.compare("right")){
|
||||
keys << XK_Right;
|
||||
return;}
|
||||
}
|
||||
|
||||
void AutoType::stringToKeysyms(const QString& string,QList<quint16>& KeySymList){
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#ifdef Q_WS_X11
|
||||
#define XK_MISCELLANY
|
||||
#define XK_XKB_KEYS
|
||||
#define XK_3270
|
||||
#include <X11/extensions/XTest.h>
|
||||
#include <X11/keysymdef.h>
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
Reference in New Issue
Block a user