ipc: a modifier keysym is no key
Shift, Control, and their kin were mapped to special keys that the engine then had a range and a check to ignore, and the GTK module made a round trip to the daemon for each press. ipckeysym maps them to key 0, which was already the "no key" every frontend and the engine skip; Kmodfirst, Kmodlast, and ismodkey go.
This commit is contained in:
@@ -252,7 +252,7 @@ engine_active_owner_lifecycle(struct ct *t)
|
||||
CT_EQ_PTR(t, nil, activeowner);
|
||||
CT_EQ_INT(t, 0, im.pre.n);
|
||||
CT_EQ_INT(t, 0, im.raw.n);
|
||||
ownerrequest(&c, Keypress, Kmodfirst, 0);
|
||||
ownerrequest(&c, Keypress, 0, 0);
|
||||
CT_EQ_PTR(t, nil, activeowner);
|
||||
res = ownerrequest(&c, Keypress, 'k', 0);
|
||||
CT_EQ_PTR(t, &c, activeowner);
|
||||
@@ -1646,7 +1646,7 @@ engine_emoji_preedit_languages(struct ct *t)
|
||||
im.l = getlang(LangJP);
|
||||
sclear(&com);
|
||||
if(typekeys(t, "ka", &com)){
|
||||
CT_CHECK(t, !keystroke(Kmodfirst+2, 0, &com));
|
||||
CT_CHECK(t, !keystroke(0, 0, &com));
|
||||
impre(&im, &shown);
|
||||
checkstr(t, "modifier preserves Japanese", "か", &shown);
|
||||
CT_CHECK(t, keystroke('E', Mctrl, &com));
|
||||
@@ -1665,7 +1665,7 @@ engine_emoji_preedit_languages(struct ct *t)
|
||||
CT_CHECK(t, keystroke('E', Mctrl, &com));
|
||||
CT_EQ_INT(t, LangJP, im.l->lang);
|
||||
CT_CHECK(t, keystroke('a', 0, &com));
|
||||
CT_CHECK(t, !keystroke(Kmodfirst+2, 0, &com));
|
||||
CT_CHECK(t, !keystroke(0, 0, &com));
|
||||
CT_CHECK(t, search.lang);
|
||||
checkstr(t, "modifier preserves search", "a", &search.text);
|
||||
CT_CHECK(t, !keystroke('P', Mctrl|Mshift, &com));
|
||||
@@ -2108,7 +2108,7 @@ engine_randomized_stress(struct ct *t)
|
||||
res = ownerrequestat(owner, Keycaret, 0, 0, &pos);
|
||||
else if(op == 24)
|
||||
res = ownerrequest(owner, Keypress,
|
||||
Kmodfirst + ((rnd >> 20) & 7), 0);
|
||||
0, 0);
|
||||
else if(op == 25)
|
||||
res = ownerrequestat(owner, Keypress, 'p', Mctrl, &pos);
|
||||
else if(op == 26)
|
||||
|
||||
Reference in New Issue
Block a user