dail8859 / dail8859/LuaScript

Binding "tab" key

未关闭
#83 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C
星标
129
派生
24
PR 合并指标
30 天内没有已合并 PR

描述

I see here https://www.scintilla.org/ScintillaDoc.html#KeyBindings that tab is available as `SCK_TAB` but it can't be assigned to a shortcut `npp.AddShortcut` or using this:

```
function func1(ch)
if (ch == " ") then
print("Doesn't work (this message is never shown).");
end

print("Typed a regular character like a, b, c, d, e, etc... works.")
end

npp.AddEventHandler("OnChar", func1)
```

If I assign it manually in Notepad++'s settings then it works but the default action of `[tab]` becomes disabled (so I can't make indentation then).

Is there a way to detect `[tab]` so that I could insert text after it's pressed with `editor:AddText("text");`?

贡献指南

这个仓库没有索引到贡献指南

调研方向

Start with the OnChar event handling, npp.AddShortcut, and editor:AddText("text") usage shown in the issue, then compare their tab-key behavior with Scintilla's SCK_TAB documentation. Done means determining whether a script can detect Tab without disabling default indentation and documenting or exposing a working way to insert text after the key is pressed.

由索引模型根据 Issue 内容生成。

评估

技术栈
c, lua
领域
tooling
Issue 类型
功能
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。