[Wishes 0004076]: Enter / CtrlEnter должны эмулировать нажатие кнопки

14 views
Skip to first unread message

Mantis Bug Tracker

unread,
May 4, 2025, 2:09:06 PMMay 4
to far...@googlegroups.com
The following issue has been SUBMITTED.
======================================================================
<a target="_blank"
href="https://bugs.farmanager.com/view.php?id=4076">https://bugs.farmanager.com/view.php?id=4076</a>

======================================================================
Reported By: JohnDoe
Assigned To:
======================================================================
Project: Wishes
Issue ID: 4076
Category: Plugins API.Dialog
Reproducibility: N/A
Severity: minor
Priority: normal
Status: new
Build:
======================================================================
Date Submitted: 2025-05-04 21:09 EEST
Last Modified: 2025-05-04 21:09 EEST
======================================================================
Summary: Enter / CtrlEnter должны
эмулировать нажатие кнопки
Description:
В настоящий момент по нажатию Enter после
DN_CONTROLINPUT сразу же приходит DN_CLOSE.

Было бы удобнее, чтобы "путь" событий не
отличался от случая, когда кнопка "нажата"
хоткеем, или мышью, т.е.:
DN_CONTROLINPUT - DN_HOTKEY - DN_KILLFOCUS - DN_GOTFOCUS - DN_CONTROLINPUT -
DN_BTNCLICK - DN_CLOSE

Steps to Reproduce:
<pre class="bbcodeplus pre"><code class="bbcodeplus code language-lua">local F =
far.Flags
local width = 78
local items = {
{F.DI_SINGLEBOX, 0,0,77,3,0,0,0,0, "test"},
{F.DI_EDIT, 2,1,68,1,0,"test",0,F.DIF_HISTORY, "test"},
{F.DI_BUTTON, 70,1, 0,1,0,0,0,F.DIF_DEFAULTBUTTON, "&OK"},
}
far.Dialog(id, -1, -1, 78, 3, nil, items, 0, function (hDlg, Msg, idx, Param2)
if Msg==F.DN_HOTKEY then
far.Show("DN_HOTKEY")
elseif Msg==F.DN_KILLFOCUS then
far.Show("DN_KILLFOCUS")
elseif Msg==F.DN_GOTFOCUS then
far.Show("DN_GOTFOCUS")
elseif Msg==F.DN_BTNCLICK then
far.Show("DN_BTNCLICK")
elseif Msg==F.DN_CONTROLINPUT then
far.Show("DN_CONTROLINPUT", far.InputRecordToName(Param2))
elseif Msg==F.DN_CLOSE then
far.Show("DN_CLOSE")
end
end)
</code></pre>
======================================================================

Issue History
Date Modified Username Field Change
======================================================================
2025-05-04 21:09 JohnDoe New Issue
======================================================================

Reply all
Reply to author
Forward
0 new messages