Tk Source Code

View Ticket
Login
2026-09-25
15:22 • Ticket [749463ff] win<->X discrepancy: keysyms status still Open with 7 other changes artifact: 8d54641f user: jan.nijtmans
2024-12-10
15:41 • Ticket [b3a1b985] Enter key works differently in Windows and Linux status still Open with 3 other changes artifact: 00dcb599 user: jan.nijtmans
13:26
[b3a1b9852d] is not a bug. See TIP #158 check-in: 4adc8f6c user: jan.nijtmans tags: trunk, main
13:11 • Ticket [3119824f] Enter doesn't work in text input box status still Open with 3 other changes artifact: d90e5362 user: jan.nijtmans
13:09 • Ticket [b3a1b985] Enter key works differently in Windows and Linux status still Open with 3 other changes artifact: e72743f5 user: jan.nijtmans
13:08 • Ticket [b3a1b985]: 3 changes artifact: 3d1dc9a6 user: jan.nijtmans
2024-09-07
17:10 • Closed ticket [699ddfc4]: Is [b3a1b9] (bind KP_Enter as Return key in treeview) really applied? plus 7 other changes artifact: 49dbf24d user: jan.nijtmans
17:04
[b3a1b9] is still open, not resolved in any release branch check-in: e92cf2f7 user: jan.nijtmans tags: core-8-6-15-rc
12:57 • New ticket [699ddfc4] Is [b3a1b9] (bind KP_Enter as Return key in treeview) really applied?. artifact: 7548047a user: chw
2024-07-06
12:04 • Ticket [b3a1b985] Enter key works differently in Windows and Linux status still Open with 3 other changes artifact: 65f60545 user: anonymous
12:01 • Ticket [b3a1b985]: 3 changes artifact: 278809a0 user: anonymous
2024-06-30
17:59 • Ticket [b3a1b985]: 3 changes artifact: f14ff16f user: jan.nijtmans
17:58 • Ticket [b3a1b985]: 4 changes artifact: 563ff13a user: jan.nijtmans
17:57
Possible fix for [b3a1b9852d]: treeview: Enter key works differently in Windows and Linux leaf check-in: aa26b814 user: jan.nijtmans tags: bug-b3a1b9852d
2024-06-27
14:17 • New ticket [b3a1b985] treeview: Enter key works differently in Windows and Linux. artifact: 31eecb41 user: anonymous

Ticket UUID: b3a1b9852de7859caa41c050c5eb23190bcceb7c
Title: Enter key works differently in Windows and Linux
Type: Bug Version: 8.6
Submitter: anonymous Created on: 2024-06-27 14:17:22
Subsystem: 99. Other Assigned To: jan.nijtmans
Priority: 5 Medium Severity: Minor
Status: Open Last Modified: 2024-12-10 15:41:52
Resolution: None Closed By: nobody
    Closed on:
Description:

Enter key (KP_Enter event) on treeview widget:

  1. In Windows - processed as Return key (i.e. selects an item)
  2. In Linux - ignored

In Windows, seemingly, the behavior is better.

User Comments: jan.nijtmans added on 2024-12-10 15:41:52:

As described in TIP #158, the current situation is:

 bind ... <Return>  "pressReturn"
 bind ... <KP_Enter>  "pressEnter" ; # only useful on Unix
 bind ... <Extended-Return>  "pressEnter" ; # only useful on Windows

Idea (to be TIP'ed): What if in Tk 9.1, binding "<KP_Enter>" will automatically be translated to "<Extended-Return>" (for compatibility with 9.0). On Windows, no further changes need to be made. On UNIX, when the KP_Enter is received by the keyboard, it will be translated to Extended-Return. That means that the "Return" binding will fire (if no separate "Extended-Return" binding is registered).

This way, the behavior on UNIX will become the same as the current behavior on Windows.


jan.nijtmans added on 2024-12-10 13:09:46:

See: TIP #158

Dup of [b3a1b9852d]


jan.nijtmans added on 2024-12-10 13:08:34:
See: [https://core.tcl-lang.org/tips/doc/trunk/tip/158.md|TIP #158]

Dup of [3119824]

anonymous added on 2024-07-06 12:01:30:

The same problem with other choosing widgets, e.g. with buttons.

I.e. it's a problem of all Linux Tk widgets that don't handle KP_Enter as Return key, while Windows version and other Linux GUI libraries do handle it in the same manner as Return key.


jan.nijtmans added on 2024-06-30 17:58:52:

Does [aa26b81418|this] work better?