Menu

#2241 Typing ''t' triggers build

None
fixed
nobody
None
1
2017-09-09
2017-08-22
Anonymous
No

This is drivin' me nuts. When I type an apostrophe ('), using the key in between ; and Return (this one), followed by the letter 't', it triggers TeXstudio to build the document. Specifically it tells it to Build & View. So every time I want to type something like 'he doesn't think X', what I get is 'he doesn'', at which point TeXstudio cuts me off because it's building. More info:

  • I'm on version TeXstudio 2.12.6 (hg 6632:7777b2b8a906)
  • I've tried all other letters, the building only triggers when the apostrophe is followed by the letter t.
  • I've not customized the hotkey settings at all, and could't find anything relating to apostrophes in the hotkey settings.
  • If I freshly open TeXstudio this does not happen, only after I've F5-ed once (and the preview window is open) does this behavior start. If I close the preview after the first run, the behavior persists.

The behavior happens not just in complex documents, but already manifests with simple examples like this:

`\documentclass{article}

\begin{document}

Hello world. This doesn'

\end{document}`

Does anyone have any idea? I'm a novice LaTeX user, let me know what further details I can provide to help clear this up.

Discussion

  • Frank van Caspel

    Oops, apparently I wasn't logged in when I posted that bugreport (is that even possible? Sourceforge has had issues over the past few days). Anyway, it was me, and now I can't edit my post to remove that bothersome typo. Apologies.

     
  • Jan  Sundermeyer

    Jan Sundermeyer - 2017-08-22

    which OS

     
  • Frank van Caspel

    Windows 10.

    Edit: specifically Windows 10 Pro 64-bit, running on a Microsoft Surface Pro 4 (m3-6y30 CPU).

     

    Last edit: Frank van Caspel 2017-08-23
  • Jan  Sundermeyer

    Jan Sundermeyer - 2017-08-23

    what keyboard layout is used ? Any helper programs concerning keyboard ?
    where is the installer from ?

     
  • Frank van Caspel

    I'm using United States (international) keyboard layout, and have not installed any programs relating to the functioning of the keyboard as far as I know. It's bare Windows + Google Drive & F.lux. No other programs display any strange behavior upon me typing 't.

    I've installed TeXstudio by downloading the installer via texstudio.org/#download.

    Edit: I've been using TeXstudio for a while, and can't remember ever having this issue in previous versions (running on the same machine). I suppose it's something I would have noticed had it been an issue before.

     

    Last edit: Frank van Caspel 2017-08-23
  • Tim Hoffmann

    Tim Hoffmann - 2017-08-23

    same here: [bugs:#2008]

    But I still cannot reproduce it here. So we can only try the cumbersome way of identifying the issue on your system. Please do the following and check on every step if the problem still exists:

    1. Download the portable version and run this.
    2. Go to Options -> Shortcuts and remove both the current and the additional shortcut for Tools -> Build and View.
    3. Save the file to test.txt. (Changing to txt will deactivate further LaTeX related editor functions.)
     

    Related

    Bugs: #2008

  • Frank van Caspel

    Thanks for doing this, Tim.

    1. Ran the portable version, created minimal example as above, and the problem persists.
    2. Deleted both the current (F5) and additional (F1) shortcut for Build & View. The problem is GONE! I've also tried the other combinations with the letter t listed in bug #2008, and none of those trigger the Build & View either.

    I've gone back to my regular installation, and confirmed that doing step 2 there also fixes the problem. In fact: it is enough to only delete F5 as the current hotkey. F1 is then automatically set as the current hotkey, and the problem is gone. I'll just switch to F1, a very small price to pay indeed :).

     
  • Tim Hoffmann

    Tim Hoffmann - 2017-08-24

    I'm glad, there is a simple workaround.

    Nevertheless, the behavior is quite strange. I would like to fix the cause because I seems to affect also some other people. Would you be willing to perform some more test, to help me fix this?

    If so, next step to verify the relation 't <-> F5 shortcut: Please assign F5 to another menu item, e.g. Help -> About. Does 't open the about menu then?

     
  • Frank van Caspel

    I'd be very glad to help, just give me pointers and I'll follow up.

    I've set F5 as a hotkey for 'About' and the behavior resurfaces. Now when I type 't, the About-screen pops up. Same as before in that it doesn't happen until a first Build & View has happened, and then occurs consistently.

     
  • Tim Hoffmann

    Tim Hoffmann - 2017-08-29

    Thanks. Next step: Testing if the key press is required (still using F5 bound to the about dialog).

    Test 1:
    Copy a t into the clipboard. Type ' then paste using Ctrl+V. Does this trigger the shortcut?

    Test 2:
    You can input characters using their ascii-code by holding the left Alt key and typing the ascii code on the numeric keypad, i.e. for typing ' (ascii code 39)

    • press and hold left Alt
    • type 39 on the numeric keypad
    • release the Alt key

    Effect: the corresponding character is inserted.

    Try all the combinations of inserting either ' (code 39) or t (code 116) or both and check if this triggers the shortcut.

     

    Last edit: Tim Hoffmann 2017-08-29
    • Frank van Caspel

      Apologies, double post.

       

      Last edit: Frank van Caspel 2017-08-30
  • Frank van Caspel

    This is really weird: suddenly, without me changing anything the behavior has become inconsistent. Now sometimes I can load up TeXstudio with a basic example and the bug won't surface right away after me compiling once. But then after a while, without me doing anything, it does start happening. I've been testing a bit but I'm really not doing anything else to trigger it. I thought it might have been Alt-tabbing or typing other letters before 't that would prime the bug, but none of that's the case. No idea why sometimes there's a delay now.

    At other times the bug appears as before. I've confirmed that F5 is still set as the hotkey for About.

    Something new has also just surfaced: right now when I press the '-button and then the t-button, what happens is that only a ' appears, and weirdly enough the cursor will stay behind the '. So when I continue to type the ' stays at the end of the line. This behavior is unique to TeXstudio, I've also got Chrome, Notepad and Word open and they all work normally. A reboot of TeXstudio fixes this.

    Anyhow, I've managed to get the bug 'working' again (currently every time I type 't the About-menu pops up), and followed your steps:

    1. If I press the '-key and then Ctrl+V, only a t appears, and the bug does not trigger. If I press the '-key, then space, then Ctrl+V, 't appears, and the bug does not trigger.

    2-5:

    • [39]+[116] = triggers
    • ' + [116] = triggers
    • [39] + t = does NOT trigger

    I'm clueless...

     
  • Tim Hoffmann

    Tim Hoffmann - 2017-08-30

    Just to be sure, we're talking about the apostroph ', not about accent or (back)ticks ` or ´?

    If I press the '-key and then Ctrl+V, only a t appears, and the bug does not trigger. If I press the '-key, then space,

    Now, that's getting interesting. Is the apostroph a dead key on your keyboard?

     
  • Frank van Caspel

    I'm not 100% on the terminology, but yes: I think the key I'm referring to is the apostrophe key, and I think it's what you refer to as a dead key. The key I'm talking about is indicated in the image I link to in the start post, and when I press it once, it does not produce an immediate output. If followed by space it produces ', if followed by vowels it modifies it (áéíóúý). I thought this was standard behavior - I've never known it to behave differently.

    Do you think dead keys have something to do with it? If the dead keys are followed by any other letter than t there's no problem, so it would have to be a very specific problem. I did try all other 'dead key combinations' I could think of and combined them with t, and all of them triggered the issue. So for example when I press Shift + ^ (the 6-key), then release, then follow by t, the bug triggers. Had I pressed a in stead of t, I would have gotten â.

     
  • Jan  Sundermeyer

    Jan Sundermeyer - 2017-08-31

    now we are getting somewhere. Most european keyboard maps have different keys for ' and ´, hence you can't provoke said behaviour. Probably we need to test the issue with american (intl) keybaord map ... a quick test on osx did not show the false triggering, but it showed the said key composing.

     
  • Frank van Caspel

    Just to confirm: my physical keyboard layout is exactly like in the image I linked to in the startpost (except I have some extra keys like Fn), and in Windows my keyboard layout is set to United States (International).

     
  • Jan  Sundermeyer

    Jan Sundermeyer - 2017-08-31

    seems to be a qt bug
    ´+t triggers the behaviour on German keyboards, even in QT-creator...

     
  • Jan  Sundermeyer

    Jan Sundermeyer - 2017-08-31

    the bug is still present in qt 5.9.1

     
  • Jan  Sundermeyer

    Jan Sundermeyer - 2017-08-31

    I have implemented a work-around for win which filter especially ´+t .
    It would be interesting to know whether there are other combinations which might cause problems

     
  • Tim Hoffmann

    Tim Hoffmann - 2017-08-31

    This is a known QTBUG-61458.

    Seems to affect at least other '+[char] = Fx as well (see bug report).
    e.g. '+s = F4.

     
  • Jan  Sundermeyer

    Jan Sundermeyer - 2017-08-31

    so probably we should filter alls single chars withoput modifier ...

     
  • Tim Hoffmann

    Tim Hoffmann - 2017-08-31

    I cannot test right now.

    Is there a particular reason that you've used a tick '´' and not an apostroph ' in your fix?
    Maybe we should limit the patch to Qt and the US international layout?

     
  • Jan  Sundermeyer

    Jan Sundermeyer - 2017-08-31

    the bug also comes up with German '+t. The key was checked before the fix ...

     
  • Frank van Caspel

    You guys are awesome for uncovering the issue so quickly. I'll shut up for now but will keep reading in case you want me to test something on my system.

     
  • Jan  Sundermeyer

    Jan Sundermeyer - 2017-09-09
    • status: open --> fixed
    • Group: -->
     

Log in to post a comment.

MongoDB Logo MongoDB