Skip to content

Commit

Permalink
feat(hotkey, browser-compat): add Esc-A (= Ctrl-A) & Esc-N (= Ctrl-N)…
Browse files Browse the repository at this point in the history
… hotkeys

Functions which can now be accessed with the Esc-A hotkey:
* maple/talk.c:
    * talk_speak(): (Already commented out) Open game BWboard() (already removed)
* maple/xover.c:
    * xover_key() & xo_tag(): Tag all articles by the same author

Functions which can now be accessed with the Esc-N hotkey:
* maple/post.c:
    * post_clean_delete(): Remove an article from the list immediately
  • Loading branch information
IepIweidieng committed Mar 6, 2021
1 parent 750c517 commit 3d99c78
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions maple/post.c
Original file line number Diff line number Diff line change
Expand Up @@ -4114,6 +4114,7 @@ KeyFuncList post_cb =
{'i', {post_showBRD_setting}}, /* cache.081122:看板資訊顯示 */
{Ctrl('P'), {post_add}},
{Ctrl('N'), {post_clean_delete}},
{Meta('N'), {post_clean_delete}},
#ifdef HAVE_MULTI_CROSSPOST
{Ctrl('X'), {post_xcross}},
#endif
Expand Down
4 changes: 2 additions & 2 deletions maple/talk.c
Original file line number Diff line number Diff line change
Expand Up @@ -2645,7 +2645,7 @@ talk_speak(
if (ch <= 0)
break;
#if 0 // IID.20190508: `bwboard.so` and `chess.so` do not exist anymore.
if (data[0] == Ctrl('A'))
if (data[0] == Ctrl('A') || data[0] == Meta('A'))
{ /* Thor.990219: 呼叫外掛棋盤 */
if (DL_NAME_CALL("bwboard.so", BWboard)(fd, 1)==-2)
break;
Expand Down Expand Up @@ -2694,7 +2694,7 @@ talk_speak(
}
}
#if 0 // IID.20190508: `bwboard.so` and `chess.so` do not exist anymore.
else if (ch == Ctrl('A'))
else if (ch == Ctrl('A') || ch == Meta('A'))
{ /* Thor.990219: 呼叫外掛棋盤 */
/* int BWboard(int sock, int later); */
data[0] = ch;
Expand Down
4 changes: 2 additions & 2 deletions maple/xover.c
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ xo_tag(
return XO_NONE;

head = (const HDR *) xo_pool_base + xo->pos;
if (op == Ctrl('A'))
if (op == Ctrl('A') || op == Meta('A'))
{
token = head->owner;
op = 0;
Expand Down Expand Up @@ -2001,7 +2001,7 @@ xover_key(
}
return XO_NONE;
}
if (cmd == Ctrl('A') || cmd == Ctrl('T') || cmd == Meta('T'))
if (cmd == Ctrl('A') || cmd == Meta('A') || cmd == Ctrl('T') || cmd == Meta('T'))
{
return xo_tag(xo, cmd);
}
Expand Down

0 comments on commit 3d99c78

Please sign in to comment.