MCPcopy Create free account
hub / github.com/ChiyukiGana/Quickinput / QiHook

Function QiHook

source/src/trigger.cpp:133–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131 macro.thread.run_start(&macro);
132 if (Qi::set.showTips && !Qi::ui.pop.upe.t.isEmpty()) QiFn::MacroPop(&macro, true);
133 if (Qi::set.audFx) QiFn::SoundPlay(Qi::ui.pop.upe.s, false);
134 }
135 } break;
136 }
137 }
138 }
139 void QiHook(bool state)
140 {
141 if (state)
142 {
143 Qi::keyBlock.clear();
144 if (!InputHookT::State())
145 {
146 timeBeginPeriod(1);
147
148 if (!InputHookT::Start()) MsgBox::Error(L"创建输入Hook失败,检查是否管理员身份运行 或 是否被安全软件拦截。");
149
150#ifdef Q_KEYEDIT_PAD_ENABLED
151 if (Qi::set.pad) Qi::xboxpad.setStateEvent([](short keyCode, short state) {
152 Qi::keyState[keyCode] = (bool)state;
153 std::array<bool, Qi::key_size> t(Qi::keyState);
154 Trigger(keyCode, t.data());
155 }, true);
156#endif
157 }
158 }
159 else
160 {
161 if (InputHookT::State())
162 {
163 timeEndPeriod(1);

Callers 4

eventMethod · 0.85
StartMethod · 0.85
EventMethod · 0.85
eventMethod · 0.85

Calls 5

ErrorEnum · 0.85
TriggerFunction · 0.85
setStateEventMethod · 0.80
closeStateEventMethod · 0.80
StateEnum · 0.50

Tested by

no test coverage detected