bugGNU TeXmacs - Bugs: bug #40752, Keyboard shortcuts in Qt textual...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #40752: Keyboard shortcuts in Qt textual input widgets

Submitter:  Joris van der Hoeven <vdhoeven>
Submitted:  Fri 29 Nov 2013 07:57:15 PM UTC
   
 
Category:  Qt port Priority:  5 - Normal
Item Group:  Error Status:  Fixed
Privacy:  Public Assigned to:  mdbenito
Originator Name:  Open/Closed:  Closed
Release:  None Release: 
Fixed Release:  1.99.12 Fixed Release: 
Keywords: 

Sat 19 Oct 2019 05:31:34 PM UTC, comment #5: 

I think the line inputs work fine now.
A more annoying problem is bug #53988.
I close the bug.  Please re-open if you think that
there is still an issue to be solved.

Joris van der Hoeven <vdhoeven>
Group administrator
Tue 03 Dec 2013 05:54:39 PM UTC, comment #4: 

I don't think that we should worry too much about customized key bindings for this issue.  Instead, you might provide a hook for letting the user override the default key bindings for the QTMLineEdit widget.

Joris van der Hoeven <vdhoeven>
Group administrator
Tue 03 Dec 2013 04:40:11 PM UTC, comment #3: 

This is not enough because as I said, the user may have customized her key bindings. As a better version of my first proposal, when building the widget, we can read the current kbd-maps assigned to the scheme commands which in a texmacs buffer perform the desired actions. I will try to implement this.

As to the use of TeXmacs input widgets, yes. They are inadequate as-is.

Miguel de Benito <mdbenito>
Group Member
Tue 03 Dec 2013 01:53:17 PM UTC, comment #2: 

Yes, I think that the shortcuts should be hardcoded.  The right solution is indeed to implement a specific QTMLineEdit widget, which looks up the main look and feel in the preferences (now implemented in C++) and hardcodes the most common shortcuts (approximately those implemented in the case of Widkit) for that look and feel in the C++ code.

We should avoid to use TeXmacs input widgets for line edits; that seems overkill to me and it would impact the widget layout in a major way.

Joris van der Hoeven <vdhoeven>
Group administrator
Tue 03 Dec 2013 11:55:28 AM UTC, comment #1: 

I don't see how we could implement this other than with a hack, as is done in WidKit's input_widget. There, shorcuts for begin, end, left, right, etc. are hardcoded:


...
if (key == "return") commit ();
  else if ((key == "escape") || (key == "C-c") ||
           (key == "C-g")) cancel ();
  else if ((key == "left") || (key == "C-b")) {
    if (pos>0) tm_char_backwards (s, pos); }
  else if ((key == "right") || (key == "C-f")) {
    if (pos<N(s)) tm_char_forwards (s, pos); }
  else if ((key == "home") || (key == "C-a")) pos=0;
  else if ((key == "end") || (key == "C-e")) pos=N(s);
  else if ((key == "up") || (key == "C-p")) {
...


I think this is not a proper solution, since the user may have customized his "standard" shortcuts. We may:

  • Choose an appropriate subset of the shortcuts and using some special syntax (maybe simply the standard user preferences) let the user customize them. Maybe do this in generic-kbd.scm.
  • Implement a new QTMLineEdit with a TeXmacs buffer (or rather a simplified version thereof, as light as possible). This is probably needed if we want a proper search/replace dialog.
Miguel de Benito <mdbenito>
Group Member
Fri 29 Nov 2013 07:57:15 PM UTC, original submission:  

Some of the standard keyboard shortcuts do not apply inside Qt's textual input widgets.  We should ensure that standard shortcuts for cursor movement, forward/backward delete, and copy/cut/paste work in the same way as in the main TeXmacs widget.

Joris van der Hoeven <vdhoeven>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mdbenito (Posted a comment)
  • -email is unavailable- added by vdhoeven (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-10-19 vdhoeven StatusConfirmed Fixed
        Open/ClosedOpen Closed
        Fixed ReleaseNone 1.99.12
    2013-12-03 vdhoeven Priority4 - Bit lower 5 - Normal
        StatusNeed Info Confirmed
    2013-12-03 mdbenito Priority5 - Normal 4 - Bit lower
        StatusConfirmed Need Info

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code