Comments (2)
Hyprland도 비슷한 이슈가 생겼습니다. kime-indicator를 보면 한/영 전환이 되는건 표시가 되는데, 한글 모드 일 때 입력이 되지 않습니다.
from kime.
아래 코드가 Sway 1.8.1에서는 preedit이 뜨며 카운트가 하나씩 올라가는데, Sway 1.9에서는 카운트가 올라가다가 말 때도 있고 아예 preedit이 안 보일 때도 있네요. set_preedit_string
대신 commit_string
으로 해도 Sway 1.9의 동작이 이상한 건 비슷합니다. (Wayland 쪽 처음 건드려봐서 제가 잘못 짰을 수도 있어요)
//! ```cargo
//! [dependencies]
//! anyhow = '1.0.80'
//! wayland-client = '0.31.2'
//! wayland-protocols-misc = { version = '0.2.0', features = ['client'] }
//! ```
use std::{
fmt::Debug,
thread,
time::{Duration, Instant},
};
use wayland_client::{
globals::registry_queue_init, protocol::wl_seat::WlSeat, Connection,
Dispatch,
};
use wayland_protocols_misc::zwp_input_method_v2::client::zwp_input_method_manager_v2::ZwpInputMethodManagerV2;
struct Suntofu {
since: Instant,
}
// does not handle all events, just logging only.
impl<Proxy, UserData> Dispatch<Proxy, UserData> for Suntofu
where
Proxy: wayland_client::Proxy,
Proxy::Event: Debug,
{
fn event(
Suntofu { since }: &mut Self,
_: &Proxy,
event: Proxy::Event,
_: &UserData,
_: &Connection,
_: &wayland_client::QueueHandle<Self>,
) {
let timestamp = since.elapsed().as_millis();
let protocol = Proxy::interface().name;
println!("{timestamp:5}ms [{protocol}] {event:?}");
}
}
fn main() -> anyhow::Result<()> {
let conn = Connection::connect_to_env()?;
let (globals, mut event_queue) = registry_queue_init::<Suntofu>(&conn)?;
let handle = event_queue.handle();
let seat: WlSeat = globals.bind(&handle, 1..=1, ())?;
let im_manager: ZwpInputMethodManagerV2 =
globals.bind(&handle, 1..=1, ())?;
let im = im_manager.get_input_method(&seat, &handle, ());
let mut tofu = Suntofu {
since: Instant::now(),
};
event_queue.roundtrip(&mut tofu)?;
for i in 1..100 {
thread::sleep(Duration::from_millis(500));
event_queue.roundtrip(&mut tofu)?;
let preedit = format!("사과 {i}개");
let len = preedit.len();
im.set_preedit_string(preedit, 0, len as _);
im.commit(i);
}
Ok(())
}
실행 결과
Sway 1.8.1
18.mp4
Sway 1.9
19.mp4
from kime.
Related Issues (20)
- 쉬프트 + 스페이스바 한영 바꾸기 HOT 3
- 카카오 톡에서 . 이 한번씩 찍어진다.
- Caps lock을 활용하여 한영전환 하는 방법이 있을까요? HOT 3
- 파이어폭스에서 Ctrl, Alt, Shift 등의 modifier나 방향키를 누르면 입력 칸을 지워버리는 문제가 있습니다. HOT 7
- P2에서 버튼 매핑이 잘못된 거 같아요.
- 세팅이 갑자기 먹통입니다. HOT 3
- 김프 최신버전과 kime 최신 버전 버그 인거 같은데요.
- Build the package with Open Build Service
- 에러 발생 [ERROR] ServerError occurred while process event: Can't read xim message: End of Stream
- Zoom meetings, Slack 에서 동작 안하는 문제 HOT 6
- wayland: backspace 반복의 딜레이가 pre-edit과 텍스트에 모두 적용
- 두 형태의 ㅗ, ㅜ 모두 허용 HOT 2
- chrome+wayland text selection bug HOT 4
- ubuntu 16.04 에서는 지원이 안되는지요?
- emoji/math/hanja modes are not documented in CONFIGURATION{,.ko}.md
- --enable-wayland-ime로 chrome/vscode 실행시 SIGILL 받고 종료되는 문제 HOT 5
- Emoji mode: 🏳️⚧️ transgender flag not included
- 설치중 모듈 ffi 관련 에러 HOT 4
- 세벌식에서는 ComposeJungseongSsang 기능이 작동을 안하나요? HOT 6
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 kime.