minor Bug Fixes

This commit is contained in:
Alexander Richter 2023-05-02 16:04:26 +02:00
parent da66118131
commit e72e94b94b
2 changed files with 9 additions and 6 deletions

View File

@ -209,7 +209,7 @@ const int numCols = 4; // Define the number of columns in the matrix
const int rowPins[numRows] = {2, 3, 4, 5}; const int rowPins[numRows] = {2, 3, 4, 5};
const int colPins[numCols] = {6, 7, 8, 9}; const int colPins[numCols] = {6, 7, 8, 9};
//####################################### END OF CONFIG ###########################
int keys[numRows][numCols] = { int keys[numRows][numCols] = {
{1,2,3,4}, {1,2,3,4},
@ -223,6 +223,7 @@ int lastKey= 0;
//#define DEBUG //#define DEBUG
//####################################### END OF CONFIG ###########################
//###Misc Settings### //###Misc Settings###
const int timeout = 10000; // timeout after 10 sec not receiving Stuff const int timeout = 10000; // timeout after 10 sec not receiving Stuff

View File

@ -312,11 +312,13 @@ while True:
elif cmd == "M": elif cmd == "M":
firstcom = 1 firstcom = 1
if value == 1 & LinuxKeyboardInput & Destination[io]: if value == 1:
subprocess.call(["xdotool", "key", Chars[io]]) if Destination[io] == 0 and LinuxKeyboardInput == 1:
else: subprocess.call(["xdotool", "key", Chars[io]])
c["MKey.{}".format(Chars[io])] = 1 if(Debug):print("Emulating Keypress{}".format(Chars[io]))
if(Debug):print("MKey{}:{}".format(Chars[io],1)) else:
c["MKey.{}".format(Chars[io])] = 1
if(Debug):print("MKey{}:{}".format(Chars[io],1))
if value == 0 & Destination[io] == 0: if value == 0 & Destination[io] == 0:
c["MKey.{}".format(Chars[io])] = 0 c["MKey.{}".format(Chars[io])] = 0