Skip to content

feat: comebacks, champ-select quick phrases and their shortcut, shortcuts and typing in games, and the QQ group - #43

Merged
sunerpy merged 13 commits into
mainfrom
feat/comebacks
Nov 3, 2026
Merged

sunerpy merged 13 commits into
mainfrom
feat/comebacks

Conversation

@sunerpy

@sunerpy sunerpy commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Shortcuts in a game (fix). On the owner's PC no press of a system shortcut (RegisterHotKey)
    ever reached winer while the game had the screen: every press in the lobby and champ select is in
    the log, none in any game, with winer elevated. While a game runs (GameStart, InProgress,
    Reconnect), app/src-tauri/src/game_keys.rs now listens through a WH_KEYBOARD_LL hook, as
    ZuAnBot does: only an exact combination winer holds, pressed with the game's window in front, goes to
    winer instead of the game; every other key passes untouched, and no key is logged.
  • Typing into a game started from WeGame (fix). The owner's callout shortcut typed nothing in a
    game: WeGame starts the client, and so the game, elevated, and SendInput from a winer without
    elevation is dropped by UIPI with no error (docs/platform-notes.md). winer now reads the game
    window's token before it types (elevation::token_of); when the game outranks it, nothing is typed
    and Activity says why (needsAdmin). With in-game typing set up (the callout's or a comeback's
    switch and shortcut), winer asks once at connect, or when that setting changes while connected, to
    restart elevated when the client outranks it; a refusal is final for the run. Automation's in-game
    row and the Comebacks page show the rights note with 以管理员身份重启 while winer is not elevated.
  • Comebacks page (反击, Ctrl+7). The user's own lines (100 of 200 characters; winer ships
    none), one at random a press and never the same twice in a row; two shortcuts, 发到队伍 and
    发到全体 (/all , split into prefixed pieces); champ select's chat through the client's API,
    the game's chat by typing only with 在游戏里输入 on (off by default); 3 s between two sends;
    comebackSent, comebackStopped and comebackSkipped in Activity. The four shortcuts never share
    a combination.
  • Champ-select quick phrases. On the Live page's champ-select board every teammate but the user
    has a phrase menu; send_phrase(index, gameId, cellId) fills the seat (5L), champion and name and
    posts one message, and refuses another champ select, the user's own cell and any cell not of the
    team, so a menu left open sends nothing to the wrong player. Default: 「{seat}大佬,小弟想玩下{champion},给您磕一个了」.
    Its own shortcut, 发给交换的队友 (none by default): after 交换 on a teammate in the client, a press
    sends the first phrase for the cell whose trade reads SENT (ChampSelectSession.trades; the
    client's /help names the states), behind the same 3 s spacing; Activity says when no trade was
    asked. The Comebacks page warns while there is no line to send.
  • Online library (opt-in). The open 祖安语录 of cndiandian/zuanbot.com (Apache-2.0), pinned to
    commit a79264d5, 970752 bytes and its SHA-256, fetched only after the confirmation
    (我已了解,下载) from jsDelivr's mirrors, then GitHub, through the system proxy; read by a small
    bounds-checked SQLite reader (crates/core/src/sqlite.rs), cleaned to 682 + 994 lines and kept in
    comeback-library.json. Every download and every removal saves the switch off, so it is always
    opted into again; nothing of the library is in the repository.
  • QQ group. Settings › About gains 交流群 (加入 QQ 群, 复制群号); README and the site's FAQ show
    the link, the number and the card (docs/site/public/community/qq-group.png), which reaches the
    site once feat(winer): 文档同步复制交流群二维码所在的 public/community 目录 firlab#119 (the sync copies public/community) is merged.
  • Docs: README, the site in both languages (live, automation, settings, FAQ, overview, home, privacy:
    the new address and the new file), docs/platform-notes.md, DESIGN.md, AGENTS.md.

Tested

  • scripts/evidence.sh with the CI toolchain (RUSTUP_TOOLCHAIN=1.96.0) on 47fe510 (d8a2173 and
    82c9945 change docs only), every gate exit=0: fmt, clippy -D warnings, cargo test --workspace (lcu 12, shell
    52, winer-core 331 + 1 ignored), lcu and winer-core alone, cargo xwin check, pnpm format, lint,
    typecheck and test (shared 7, plugin 72, desktop 161); also cargo xwin clippy -p winer -D warnings.
  • The owner's PC, the test builds, WeGame client (2026-11-03). At connect winer asked once and
    restarted elevated (elevated=true); the callout and comebacks went to champ select's chat. With
    47fe510, in an ARAM game, Alt+5 logged a shortcut pressed in the game, then typing into the game's chat ... elevated=true game=Elevated, and the line reached the team chat (twice); the hook
    was installed at each game's start and removed at its end.
  • The real library through the real mirrors, run explicitly:
    cargo test -p winer-core pinned_library -- --ignored → mild 682 strong 994 sha256 ee2a22ee….
  • A comeback or a quick phrase goes only to the champ select it was pressed in: the client is asked
    which champ select it holds before the chat room is looked up and again after; a switch in between
    sends nothing (tested with a fake client). The 3 s spacing and the no-repeat rule count only a line
    that reached the chat, from when it finished.
  • The Windows QA host (a QA build, WebView2, no League client): the Comebacks page renders; 下载 opens
    the confirmation with the focus on 取消; only 我已了解,下载 downloaded (downloaded the library mild=682 strong=994 in winer's log, from a network in China); 使用在线语录 stayed off until turned on;
    移除 deleted comeback-library.json and saved library.enabled = false; Settings › About shows the
    交流群 row (its buttons were not clicked: a person uses that desktop).

Not tested

  • /all on Tencent's servers, the callout typed into a real game, and the quick phrase's shortcut on
    a real trade (no SENT captured yet: the owner asked nobody while the read-only recorder ran).

BEGIN_COMMIT_OVERRIDE
feat: 「反击」页(新菜单,Ctrl+7):按快捷键随机发一句你自己写的反击语句,选人时发到选人聊天,打开「在游戏里输入」后可输入游戏的队伍或全体聊天,两次发送至少间隔 3 秒;还没有可发的语句时页面会提示 (#43)

feat: 选人快捷语:英雄选择中点对局页队友旁的菜单,把填好楼层和英雄的一句话发到选人聊天,例如「5L大佬,小弟想玩下龙王,给您磕一个了」;也可以先在客户端对队友点「交换」,再按「发给交换的队友」快捷键发出 (#43)

feat: 反击可以使用开源的祖安语录(在线语录):下载前要确认,下载后要自己打开才会使用,文件按 SHA-256 校验,可随时移除 (#43)

feat: 设置 › 关于新增 QQ 交流群「winer交流群」(群号 1109319256),可一键加入或复制群号 (#43)

fix: 游戏中按快捷键没有反应:游戏在前台时 Windows 的系统快捷键传不到 winer,现在游戏进行中改由键盘钩子接收你设置的组合键,只接手这几个组合键,其他按键原样交给游戏 (#43)

fix: 从 WeGame 启动的游戏收不到 winer 输入的文字:游戏以管理员身份运行时会丢弃权限较低程序的按键;现在输入前先检查权限,不够时在动态里说明,并在连接客户端时请求一次以管理员身份重启 (#43)
END_COMMIT_OVERRIDE

…backs' commands

- elevation: read another process's rights (TokenRead, token_of) and whether
  they outrank winer's; ask once per run to restart elevated when typing into
  the game is set up and the connected client outranks winer, at connect or
  when the settings change while connected.
- game_chat: type nothing into a game that outranks winer (NeedsAdmin), log
  the keys still held, prefix every all-chat message with "/all " within the
  message limit, and map typing to the comeback notices.
- hotkey: the callout's slot becomes one of three, with the comebacks' team
  and all-chat shortcuts; the handler tells the four apart by id, and one
  press at a time goes out across the callout and the comebacks.
- commands: open_community, send_phrase, comeback_library,
  download_comeback_library and remove_comeback_library.
- diagnostics: a refused comeback shortcut fails the self-check like the
  callout's.
…the QQ group row

- A Comebacks (反击) page, Ctrl+7, last in the Assistant group: the user's own
  lines (add, edit, remove, count), the team and all-chat shortcuts with their
  registration status, in-game sending with its risk line, champ select's quick
  phrases with the language's default and a preview, and the online library,
  downloaded only after a confirmation and used only once its switch is on.
- The Live page's champ-select board gives each teammate other than the user a
  menu of the phrases, sent with the view's game id and the teammate's cell.
- Where in-game typing is switched on (the Comebacks page and Automation's
  callout), a line says a game started from WeGame drops winer's keys unless
  winer runs as administrator, with the restart.
- Settings > About: a Community row that opens the QQ group and copies its
  number.
- Notices for comebacks sent, stopped (with the count) and skipped, and the new
  skip reasons; no shortcut records another's combination, and one recorder
  listens at a time.
…ly lines that went out, and keep the library's switch when its file cannot be written
…the swap phrase by its own shortcut

The system's shortcuts (RegisterHotKey) never reached winer while the game had the screen: the
owner's log of 2026-11-03 has every press in the lobby and champ select and none in three games,
with winer elevated. While a game runs, a WH_KEYBOARD_LL hook now hears the same combinations,
takes only an exact one with the game's window in front, and passes every other key untouched.

The Comebacks page's quick phrases gain a shortcut: in champ select, after Trade on a teammate in
the client, it sends the first phrase for the teammate whose trade is SENT. The shortcuts panel
warns while there is no line to send, and the no-lines notice says where to add one.
@sunerpy sunerpy changed the title feat: comebacks, champ-select quick phrases, typing into elevated games, and the QQ group feat: comebacks, champ-select quick phrases and their shortcut, shortcuts and typing in games, and the QQ group Nov 3, 2026
@sunerpy
sunerpy merged commit 7186cdb into main Nov 3, 2026
6 checks passed
@sunerpy
sunerpy deleted the feat/comebacks branch November 3, 2026 16:37
@winer-release winer-release Bot mentioned this pull request Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant