Comments (7)
Does use_clipboard: false
work for you?
from google-chinese-handwriting-ime.
No, i switched to true because that didn't work
Do you guys have additional setting or packages installed? The IME has to have focus on it for the blue paste button or my keyboard Enter to respond, and the textbox in my browser firefox will lose its cursor and seems unable for me to type or paste any words
from google-chinese-handwriting-ime.
A workaround:
Copying translation to clipboard and paste it.
I can sort of use the program :) I don't think one is intended to use it this way?
from google-chinese-handwriting-ime.
Will look into this issue for once and for all, if I have time.
from google-chinese-handwriting-ime.
Hello, did you by any chance have time to look into this issue?
from google-chinese-handwriting-ime.
Hi. I don't think this program would work anymore since Google likes to break things very much and unfortunately this program relies on it. Also with the rise of wayland, the touchpad input grabbing and copy-pasting would never work the same way at least without sudo.
However sending ctrl+v by writing into device fd works very well. I have a similar simple input method project using that.
#include <fcntl.h>
#include <linux/input.h>
#include <stdio.h>
#include <unistd.h>
#define EV_PRESSED 1
#define EV_RELEASED 0
#define EV_REPEAT 2
/*
* Purpose: Stuffs the Linux keyboard buffer with a key and
* reads it back out of the buffer.
* All key definitions can be found in input.h file:
* /usr/src/linux-headers-3.2.0-23/include/linux
*
*/
int fd = 0;
// char *device = "/dev/input/event4";
char *device = "/dev/input/by-path/platform-i8042-serio-0-event-kbd";
void send_backspace() {
if ((fd = open(device, O_RDWR)) > 0) {
struct input_event event;
// Press a key (stuff the keyboard with a keypress)
event.type = EV_KEY;
event.value = EV_PRESSED;
event.code = KEY_BACKSPACE;
write(fd, &event, sizeof(struct input_event));
// Release the key
event.value = EV_RELEASED;
event.code = KEY_BACKSPACE;
write(fd, &event, sizeof(struct input_event));
close(fd);
}
}
void send_ctrl_v() {
if ((fd = open(device, O_RDWR)) > 0) {
struct input_event event;
// Press a key (stuff the keyboard with a keypress)
event.type = EV_KEY;
event.value = EV_PRESSED;
event.code = KEY_LEFTCTRL;
write(fd, &event, sizeof(struct input_event));
event.type = EV_KEY;
event.value = EV_PRESSED;
event.code = KEY_V;
write(fd, &event, sizeof(struct input_event));
// Release the key
event.value = EV_RELEASED;
event.code = KEY_V;
write(fd, &event, sizeof(struct input_event));
// Release the key
event.value = EV_RELEASED;
event.code = KEY_LEFTCTRL;
write(fd, &event, sizeof(struct input_event));
close(fd);
}
}
For this project I don't know if I can ever make it work again.
from google-chinese-handwriting-ime.
Thank you for your efforts. I look forward to your future projects.
from google-chinese-handwriting-ime.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from google-chinese-handwriting-ime.