Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completer wont start when using remapped \ key on OS X #40

Closed
jonlachmann opened this issue Feb 20, 2018 · 2 comments
Closed

Completer wont start when using remapped \ key on OS X #40

jonlachmann opened this issue Feb 20, 2018 · 2 comments

Comments

@jonlachmann
Copy link

Hi, I have been running TexMaker but wanted to try out TexStudio as it seems to pack more features. However I am very reliant on the completer writing a lot of things for me since I take notes in class and really need the speed increase it provides.

I have remapped the backslash to be the key above my tab button on my Swedish keyboard layout. This key usually makes the paragraph sign. For some reason pressing this key and writing something after it does not trigger the completer in TexStudio as it did in TexMaker.

I have added the row "§" = (insertText:, "\\"); in my defaultkeybindings.dict, you can read further on the subject here https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/EventOverview/TextDefaultsBindings/TextDefaultsBindings.html

If you can try to reproduce this and find out whats going on it would really help, since I have a hard time making the backslash on my keyboard layout as is (alt-shift-7).

Please let me know if you need any further info. OS is OS X 10.12.6 and texstudio is 2.12.6

Best regards!

@sunderme
Copy link
Member

sunderme commented Mar 7, 2018

I have no idea how the OSX key substitution works internally, but I guess it does not play well with txs/QT mechanism.
The easiest solution for you is probably to define within txs a macro:
%SCRIPT
cursor.insertText("\")
app.normalCompletion();

Set the trigger to what key you want it to start ("§" , without the quotation marks, obviously OSX key substitution should not be active)

@sunderme sunderme closed this as completed Mar 9, 2018
@jonlachmann
Copy link
Author

Just wanted to post back and let you know that the script supplied works as it should, i did have to add an extra backslash and ; Below is the working macro code. Thank you for this! =) Now I can start learning texstudio! 👍

%SCRIPT
cursor.insertText("\");
app.normalCompletion();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants