Re: blinking cursor

2026-01-05 Thread Stephan Witt via lyx-users
Am 05.01.2026 um 18:37 schrieb Chris Menzel :
> 
> Just to note for others who might be trying this trick, it took me a bit of 
> trial and error, but the following process did the job:
> 
> 1. Set values for both of the blink period keys. (This may or may not be 
> necessary but it can't hurt.)
> 
> $ defaults write -g NSTextInsertionPointBlinkPeriodOn 1000
> $ defaults write -g NSTextInsertionPointBlinkPeriodOff 1000
> 
> 2. Explicitly delete only the PeriodOff key (as I understood Stephen, 
> deleting only the PeriodOn key would also work):
> 
> $ defaults delete -g NSTextInsertionPointPeriodOff
> 
> 3. Flush the prefs daemon:
> 
> $ killall cfprefsd
> 
> 4. Restart LyX.
> 
> This will affect the cursor in all MacOS apps that use these keys, of course.
> 
> -chris

Hi Chris,

thanks for the follow-up.

I didn’t need step 3 and in theory it shouldn’t be required.

For the next LyX release I’ve implemented the check for the new system 
preference „prefer non-blinking cursor“. Furthermore the changes for 
NSTextInsertionPointBlinkPeriodOff and NSTextInsertionPointBlinkPeriodOn will 
be detected immediately.

I prefer using these global settings over a local LyX setting. I think one 
wants to disable blinking cursor in all applications or not at all.

Best regards,
Stephan

> 
> 
> On Sun, Jan 4, 2026 at 2:20 PM Tom Goldring  > wrote:
>> Yes it works -thanks so much !!
>> 
>> On 1/3/26 1:00 PM, Stephan Witt wrote:
>> > Am 03.01.2026 um 03:19 schrieb Tom Goldring > > >:
>> >> Is there any way to turn it off in MacOS 15.7.3 or any other version? I 
>> >> find it intolerable. I tried the "Prefer non-blinking cursor" in my 
>> >> System Settings, but it doesn't work in LyX.
>> > Hi Tom,
>> >
>> > LyX on Mac reads the defaults values NSTextInsertionPointBlinkPeriodOff 
>> > and NSTextInsertionPointBlinkPeriodOn on startup.
>> >
>> > If only one of both values is set the cursor blink is disabled. If both 
>> > are set the cursor blinks with a rate of the sum of these values (given in 
>> > milliseconds).
>> >
>> > You may set them with the e.g. the following command in Terminal:
>> >
>> > defaults write -g NSTextInsertionPointBlinkPeriodOn 1000
>> >
>> > The system preference „non-blinking cursor“ is not supported yet. I don’t 
>> > know how to read the user setting programmatically.
>> >
>> > BR Stephan
>> 
>> 
>> -- 
>> lyx-users mailing list
>> [email protected] 
>> https://lists.lyx.org/mailman/listinfo/lyx-users
> -- 
> lyx-users mailing list
> [email protected]
> https://lists.lyx.org/mailman/listinfo/lyx-users

-- 
lyx-users mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-users


Re: blinking cursor

2026-01-05 Thread Chris Menzel
Just to note for others who might be trying this trick, it took me a bit of
trial and error, but the following process did the job:


1. Set values for both of the blink period keys. (This may or may not be
necessary but it can't hurt.)


$ defaults write -g NSTextInsertionPointBlinkPeriodOn 1000

$ defaults write -g NSTextInsertionPointBlinkPeriodOff 1000


2. Explicitly delete only the PeriodOff key (as I understood Stephen,
deleting only the PeriodOn key would also work):


$ defaults delete -g NSTextInsertionPointPeriodOff


3. Flush the prefs daemon:


$ killall cfprefsd


4. Restart LyX.


This will affect the cursor in all MacOS apps that use these keys, of
course.


-chris


On Sun, Jan 4, 2026 at 2:20 PM Tom Goldring  wrote:

> Yes it works -thanks so much !!
>
> On 1/3/26 1:00 PM, Stephan Witt wrote:
> > Am 03.01.2026 um 03:19 schrieb Tom Goldring :
> >> Is there any way to turn it off in MacOS 15.7.3 or any other version? I
> find it intolerable. I tried the "Prefer non-blinking cursor" in my System
> Settings, but it doesn't work in LyX.
> > Hi Tom,
> >
> > LyX on Mac reads the defaults values NSTextInsertionPointBlinkPeriodOff
> and NSTextInsertionPointBlinkPeriodOn on startup.
> >
> > If only one of both values is set the cursor blink is disabled. If both
> are set the cursor blinks with a rate of the sum of these values (given in
> milliseconds).
> >
> > You may set them with the e.g. the following command in Terminal:
> >
> > defaults write -g NSTextInsertionPointBlinkPeriodOn 1000
> >
> > The system preference „non-blinking cursor“ is not supported yet. I
> don’t know how to read the user setting programmatically.
> >
> > BR Stephan
>
>
> --
> lyx-users mailing list
> [email protected]
> https://lists.lyx.org/mailman/listinfo/lyx-users
>
-- 
lyx-users mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-users


Re: blinking cursor

2026-01-04 Thread Tom Goldring

Yes it works -thanks so much !!

On 1/3/26 1:00 PM, Stephan Witt wrote:

Am 03.01.2026 um 03:19 schrieb Tom Goldring :

Is there any way to turn it off in MacOS 15.7.3 or any other version? I find it 
intolerable. I tried the "Prefer non-blinking cursor" in my System Settings, 
but it doesn't work in LyX.

Hi Tom,

LyX on Mac reads the defaults values NSTextInsertionPointBlinkPeriodOff and 
NSTextInsertionPointBlinkPeriodOn on startup.

If only one of both values is set the cursor blink is disabled. If both are set 
the cursor blinks with a rate of the sum of these values (given in 
milliseconds).

You may set them with the e.g. the following command in Terminal:

defaults write -g NSTextInsertionPointBlinkPeriodOn 1000

The system preference „non-blinking cursor“ is not supported yet. I don’t know 
how to read the user setting programmatically.

BR Stephan



--
lyx-users mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-users


Re: blinking cursor

2026-01-03 Thread Richard Kimberly Heck

On 1/3/26 2:26 PM, Stephan Witt wrote:

Am 03.01.2026 um 18:32 schrieb Richard Kimberly Heck :


On 1/3/26 12:23 PM, Paul Rubin wrote:



On 1/2/26 21:19, Tom Goldring wrote:
Is there any way to turn it off in MacOS 15.7.3 or any other 
version? I find it intolerable. I tried the "Prefer non-blinking 
cursor" in my System Settings, but it doesn't work in LyX.


This is a Qt setting. The following works on Linux Mint and may be 
doable on MacOS.


 1. Install the Qt 5 configuration tool (qt5ct on Linux).
 2. Run the tool. If you get a warning about QT_QPA_PLATFORMTHEME
not being set, you have to add the line
QT_QPA_PLATFORMTHEME=qt5ct to an appropriate configuration file
and reboot. In my case, I was able to add it to
~/.config/qt5ct/qt5ct.conf. Other Linux users report putting it
in /etc/environment or other places. You'll have to do a little
research to find the appropriate file on a Mac.
 3. Once the configuration tool is running without warnings, go to
the Interface tab and change "Cursor flash time" to 0ms. Click
Apply and then start LyX and confirm that the cursor is rock solid.

Note that this will affect all apps on your system using Qt5, not 
just LyX.


I am not sure if we use Qt5 or Qt6 with the OSX packages, but qt6ct 
also exists.


Looking at the source code, we do seem to get the cursor flash time 
from Qt, so I'd expect us to respect this setting wherever it comes 
from. If it's <=0, we do not start the blinking.



We had a ticket long time ago for this:

#9287 ((Accessibility) It is not possible to disable the blinking 
cursor) – The LyX Project 

lyx.org 
trac.ico 




Right, and as you said elsewhere, there's a way to do this.

Looking at the code quickly, could the calls to 
NSTextInsertionPointBlinkPeriod... be moved to 
GuiWorkArea::startBlinkingCaret, and effectively take the place of the 
calls there to QApplication::cursorFlashTime? That would make the OSX 
version work pretty much like the other ones. In particular, if this 
value were changed while LyX is running, we'd pick it up.


Also, this

#if defined(Q_OS_MAC)
    int const cursor_time_on = NSTextInsertionPointBlinkPeriodOn();
    int const cursor_time_off = NSTextInsertionPointBlinkPeriodOff();
    if (cursor_time_on > 0 && cursor_time_off > 0) {
        QApplication::setCursorFlashTime(cursor_time_on + cursor_time_off);
    } else if (cursor_time_on <= 0 && cursor_time_off > 0) {
        // Off is set and On is undefined of zero
        QApplication::setCursorFlashTime(0);
    } else if (cursor_time_off <= 0 && cursor_time_on > 0) {
        // On is set and Off is undefined of zero
        QApplication::setCursorFlashTime(0);
    }
#endif

looks overly complicated. Why not just:

    if (cursor_time_on > 0 && cursor_time_off > 0) {
        QApplication::setCursorFlashTime(cursor_time_on + cursor_time_off);
    } else
        QApplication::setCursorFlashTime(0);

? The case where they are both zero seems not to be handled.

Riki

-- 
lyx-users mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-users


Re: blinking cursor

2026-01-03 Thread Stephan Witt via lyx-users
Am 03.01.2026 um 18:32 schrieb Richard Kimberly Heck :
> 
> On 1/3/26 12:23 PM, Paul Rubin wrote:
>> 
>> 
>> On 1/2/26 21:19, Tom Goldring wrote:
>>> Is there any way to turn it off in MacOS 15.7.3 or any other version? I 
>>> find it intolerable. I tried the "Prefer non-blinking cursor" in my System 
>>> Settings, but it doesn't work in LyX. 
>>> 
>> This is a Qt setting. The following works on Linux Mint and may be doable on 
>> MacOS.
>> Install the Qt 5 configuration tool (qt5ct on Linux).
>> Run the tool. If you get a warning about QT_QPA_PLATFORMTHEME not being set, 
>> you have to add the line QT_QPA_PLATFORMTHEME=qt5ct to an appropriate 
>> configuration file and reboot. In my case, I was able to add it to 
>> ~/.config/qt5ct/qt5ct.conf. Other Linux users report putting it in 
>> /etc/environment or other places. You'll have to do a little research to 
>> find the appropriate file on a Mac.
>> Once the configuration tool is running without warnings, go to the Interface 
>> tab and change "Cursor flash time" to 0ms. Click Apply and then start LyX 
>> and confirm that the cursor is rock solid.
>> Note that this will affect all apps on your system using Qt5, not just LyX.
>> 
> I am not sure if we use Qt5 or Qt6 with the OSX packages, but qt6ct also 
> exists.
> 
> Looking at the source code, we do seem to get the cursor flash time from Qt, 
> so I'd expect us to respect this setting wherever it comes from. If it's <=0, 
> we do not start the blinking.
> 

We had a ticket long time ago for this:

https://www.lyx.org/trac/ticket/9287
Actually I don’t know what system property to read to respect the "Prefer 
non-blinking cursor“ setting in system settings. Unfortunately I couldn’t find 
any information regarding this.

Stephan-- 
lyx-users mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-users


Re: blinking cursor

2026-01-03 Thread Stephan Witt via lyx-users
Am 03.01.2026 um 03:19 schrieb Tom Goldring :
> 
> Is there any way to turn it off in MacOS 15.7.3 or any other version? I find 
> it intolerable. I tried the "Prefer non-blinking cursor" in my System 
> Settings, but it doesn't work in LyX.

Hi Tom,

LyX on Mac reads the defaults values NSTextInsertionPointBlinkPeriodOff and 
NSTextInsertionPointBlinkPeriodOn on startup.

If only one of both values is set the cursor blink is disabled. If both are set 
the cursor blinks with a rate of the sum of these values (given in 
milliseconds).

You may set them with the e.g. the following command in Terminal:

defaults write -g NSTextInsertionPointBlinkPeriodOn 1000

The system preference „non-blinking cursor“ is not supported yet. I don’t know 
how to read the user setting programmatically.

BR Stephan
-- 
lyx-users mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-users


Re: blinking cursor

2026-01-03 Thread Richard Kimberly Heck

On 1/3/26 12:23 PM, Paul Rubin wrote:



On 1/2/26 21:19, Tom Goldring wrote:
Is there any way to turn it off in MacOS 15.7.3 or any other version? 
I find it intolerable. I tried the "Prefer non-blinking cursor" in my 
System Settings, but it doesn't work in LyX.


This is a Qt setting. The following works on Linux Mint and may be 
doable on MacOS.


 1. Install the Qt 5 configuration tool (qt5ct on Linux).
 2. Run the tool. If you get a warning about QT_QPA_PLATFORMTHEME not
being set, you have to add the line QT_QPA_PLATFORMTHEME=qt5ct to
an appropriate configuration file and reboot. In my case, I was
able to add it to ~/.config/qt5ct/qt5ct.conf. Other Linux users
report putting it in /etc/environment or other places. You'll have
to do a little research to find the appropriate file on a Mac.
 3. Once the configuration tool is running without warnings, go to the
Interface tab and change "Cursor flash time" to 0ms. Click Apply
and then start LyX and confirm that the cursor is rock solid.

Note that this will affect all apps on your system using Qt5, not just 
LyX.


I am not sure if we use Qt5 or Qt6 with the OSX packages, but qt6ct also 
exists.


Looking at the source code, we do seem to get the cursor flash time from 
Qt, so I'd expect us to respect this setting wherever it comes from. If 
it's <=0, we do not start the blinking.


Riki

-- 
lyx-users mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-users


Re: blinking cursor

2026-01-03 Thread Paul Rubin



On 1/3/26 12:16, Richard Kimberly Heck wrote:

On 1/3/26 12:23 AM, Christopher Menzel wrote:

Is there any way to turn it off in MacOS 15.7.3 or any other version?


I don’t /think/ it is possible without hacking the LyX source (and 
maybe the Qt source?) and recompiling LyX yourself. I’m not sure why 
the developers don’t include it as an option. Maybe Riki or one of 
the other gurus will tell us.


JMarc is probably the cursor expert. I presume this would be pretty 
simple to implement.


There used to be a Qt config program, which maybe had such an option, 
but I don't see it versions later than Qt 4.


Riki



The Qt 5 config program does not have the "no blink" option, but setting 
the blink time to 0ms seems to achieve the desired effect.


Paul
-- 
lyx-users mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-users


Re: blinking cursor

2026-01-03 Thread Paul Rubin



On 1/2/26 21:19, Tom Goldring wrote:
Is there any way to turn it off in MacOS 15.7.3 or any other version? 
I find it intolerable. I tried the "Prefer non-blinking cursor" in my 
System Settings, but it doesn't work in LyX.


This is a Qt setting. The following works on Linux Mint and may be 
doable on MacOS.


1. Install the Qt 5 configuration tool (qt5ct on Linux).
2. Run the tool. If you get a warning about QT_QPA_PLATFORMTHEME not
   being set, you have to add the line QT_QPA_PLATFORMTHEME=qt5ct to an
   appropriate configuration file and reboot. In my case, I was able to
   add it to ~/.config/qt5ct/qt5ct.conf. Other Linux users report
   putting it in /etc/environment or other places. You'll have to do a
   little research to find the appropriate file on a Mac.
3. Once the configuration tool is running without warnings, go to the
   Interface tab and change "Cursor flash time" to 0ms. Click Apply and
   then start LyX and confirm that the cursor is rock solid.

Note that this will affect all apps on your system using Qt5, not just LyX.

Paul

-- 
lyx-users mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-users


Re: blinking cursor

2026-01-03 Thread Richard Kimberly Heck

On 1/3/26 12:23 AM, Christopher Menzel wrote:

Is there any way to turn it off in MacOS 15.7.3 or any other version?


I don’t /think/ it is possible without hacking the LyX source (and 
maybe the Qt source?) and recompiling LyX yourself. I’m not sure why 
the developers don’t include it as an option. Maybe Riki or one of the 
other gurus will tell us.


JMarc is probably the cursor expert. I presume this would be pretty 
simple to implement.


There used to be a Qt config program, which maybe had such an option, 
but I don't see it versions later than Qt 4.


Riki

-- 
lyx-users mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-users


Re: blinking cursor

2026-01-02 Thread Christopher Menzel
> Is there any way to turn it off in MacOS 15.7.3 or any other version?

I don’t think it is possible without hacking the LyX source (and maybe the Qt 
source?) and recompiling LyX yourself. I’m not sure why the developers don’t 
include it as an option. Maybe Riki or one of the other gurus will tell us.

> I find it intolerable. I tried the "Prefer non-blinking cursor" in my System 
> Settings, but it doesn't work in LyX.

Yeah, System Settings will have no effect on what Qt chooses to do with the 
cursor.

-chris


-- 
lyx-users mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-users