[Rd] Writing in R // R 4.2.0 on Windows doesn't work with Dasher

Ben Bolker bbo|ker @end|ng |rom gm@||@com
Mon May 16 19:51:01 CEST 2022


   You'll probably have to wait a day or so for a new build.  The 
Windows binaries are only built once a day or so.

https://cran.r-project.org/bin/windows/base/rdevel.html was built on 
2022-05-15.

   Tomas's fix was only committed an hour ago:

https://github.com/wch/r-source/commit/9b6de510e6346da7ccb582d14a7699500751efc4

   If you're really eager you can install Subversion and build from 
source <https://developer.r-project.org/SVNtips.html> (or clone the 
Github mirror etc.).

   cheers
    Ben Bolker


On 2022-05-16 1:45 p.m., Paulo Barata wrote:
> 
> Dear Tomas,
> 
> Thank you very much for dealing with this issue.
> 
> You said: "I've committed a fix to R-devel, 82368". It happens that, at 
> this very moment (Monday 16 May 18:44 UTC), The R-devel that exists on 
> both the Austria and the 0-Cloud CRAN pages is this, with a different 
> (smaller) number:
> 
> This is a Windows 64 bit binary build of the 2022-05-15 r82362 
> development snapshot of R
> 
> Anyway, I installed and tried this R-devel r82362, and Dasher does not 
> work with it.
> 
> I am not able to find R-Devel 82368 on the CRAN site. Maybe I should 
> wait a little more. Or maybe you could send me a proper link to that.


> 
> Best regards,
> 
> Paulo Barata
> 
> ----------------------------------------------------------
> 
> On 16/05/2022 14:08, Tomas Kalibera wrote:
>>
>> On 5/15/22 16:10, Paulo Barata wrote:
>>>
>>> To the R developers,
>>>
>>> I noticed today that R 4.2.0 responds to the "Enter" character of 
>>> Dasher version 5.0.0 beta in "Direct Entry" mode. An "Enter" in 
>>> Dasher causes the R prompt to jump to the next line, as an "Enter" 
>>> should do.
>>>
>>> No other characters (letters, digits, special characters like + = & ~ 
>>> | # $) are accepted by R 4.2.0 through Dasher.
>>>
>>> The "Enter" shows that, somehow, the communication between Dasher and 
>>> R 4.2.0 through the Windows system is not completely curtailed.
>>
>> Dear Paulo,
>>
>> thanks for the report and thanks to all for the useful comments in the 
>> followup discussion. I've committed a fix to R-devel, 82368, and I 
>> would be grateful if you could test whether it fixes the problem for 
>> you. I've tested it only on a small example which is using the same 
>> method to insert keys to Rgui as Dasher does.
>>
>> The problem is caused by a limitation in GraphApp, a library used by 
>> Rgui and included in the R distribution. GraphApp has two modes: 
>> Unicode windows (with this limitation) and non-Unicode windows 
>> (without it). GraphApp uses Unicode windows when running in a 
>> multi-byte locale, and as of R 4.2, this is the case for all systems 
>> on recent Windows where the native encoding is UTF-8. This means that 
>> most likely R 4.1.3 didn't work with Dasher on systems running in a 
>> multi-byte locale and that most likely R 4.2.0 would work with Dasher 
>> on old Windows systems (where UTF-8 cannot be used as native encoding).
>>
>> Dasher uses SendInput/KEYEVENTF_UNICODE to inject text into Rgui, 
>> which is fine as far as I can tell and should work. It didn't work, 
>> because the Unicode windows didn't handle WM_CHAR nor 
>> WM_KEYDOWN/WM_KEYUP for VK_PACKET. By design, Unicode windows get 
>> input via WM_IME_COMPOSITION and WM_KEYDOWN, so I've added support for 
>> VK_PACKET to WM_KEYDOWN (taking the logic in gdk as an example).
>>
>> I am cc'ing Jose as Tinn-R has a similar problem, though this patch 
>> doesn't solve it.
>>
>> Best
>> Tomas
>>
>>>
>>> Regards,
>>>
>>> Paulo Barata
>>>
>>> ----------------------------------------------------------
>>>
>>> On 13/05/2022 16:44, Paulo Barata wrote:
>>>> To the R developers,
>>>>
>>>> I would like to point out an issue that occurs with the new R 4.2.0 
>>>> running on Windows; this is possibly related to the recent wide 
>>>> changes made to the Windows port of R. The issue has to do with 
>>>> writing of the R window.
>>>>
>>>> My computer runs on Windows 10 Professional 64-bit with all the 
>>>> latest updates, and has a 4-core 8-thread Intel Xeon processor with 
>>>> 32 Gb of RAM.
>>>>
>>>> I have some slight impairment in my hands, so for typing I avoid 
>>>> using the computer keyboard as much as possible. For most of my 
>>>> typing, I use the software Dasher, a kind of assistive technology 
>>>> software. Dasher was created by the Inference Group led by Professor 
>>>> David MacKay (died in 2016) at Cambridge University in England. 
>>>> Later, Dasher was further developed by Ada Majorek (a Google 
>>>> engineer, recently deceased).
>>>>
>>>> General information on Dasher and about the Dasher Project can be 
>>>> found on the Inference Group page:
>>>>
>>>> http://www.inference.org.uk/dasher/
>>>>
>>>> An example of Dasher in action can be seen on this 2-minute YouTube 
>>>> video:
>>>>
>>>> https://www.youtube.com/watch?v=nr3s4613DX8
>>>>
>>>> An one-hour YouTube video of a 2007 Google Talk by Professor MacKay 
>>>> himself explaining the Dasher concept can be found here:
>>>>
>>>> https://www.youtube.com/watch?v=wpOxbesRNBc
>>>>
>>>> In the 2-minute video (the first YouTube address above), the 
>>>> sentence written through Dasher, for actual use, needs to be copied 
>>>> and then pasted into another software, say a text editor. But Dasher 
>>>> also has a "Direct Entry" mode, where words typed are entered 
>>>> directly on the screen of the text editor or other software -- this 
>>>> is how I use Dasher to write on the R window.
>>>>
>>>> Using Dasher`s "Direct Entry" mode, for all effects, to write a word 
>>>> through Dasher works exactly like writing the word through the 
>>>> normal computer keyboard. Somehow (I do not know about system 
>>>> programming), in "Direct Entry" mode, the output of Dasher is 
>>>> understood by the computer as an input of the same nature as a 
>>>> keyboard input.
>>>>
>>>> But this is the issue: until R 4.1.3, R accepted normally the 
>>>> word-typing through Dasher. But R 4.2.0 (and R 4.2.0-patched build 
>>>> r82348, 12 May 2022) does not accept Dasher anymore.
>>>>
>>>> So, for now, if I wish to use R during some extended interactive 
>>>> section (say, for a first look at a complex data set), and if I wish 
>>>> to use Dasher for this interactive session, then I have to use R 
>>>> 4.1.3. For using R through programming, I can use the new R 4.2.0, 
>>>> by writing the program with Dasher in my text editor, and then 
>>>> pasting that program into R.
>>>>
>>>> The latest Windows version of Dasher, version 5.0.0 beta, works 
>>>> perfectly well with text editors (I use EditPad Pro), with 
>>>> Microsoft-like Office packages (I use SoftMaker Office), for writing 
>>>> e-mails (I use Mozilla Thunderbird), for writing on a web page (I 
>>>> use mostly Mozilla Firefox). It worked perfectly well with R up to 
>>>> version 4.1.3, but it does not work with R 4.2.0
>>>>
>>>> The latest Dasher 5.0.0 beta Windows installer and the source code 
>>>> can be found on this page below (please click on "Windows installer" 
>>>> and on "source code", just below the head "Dasher 5.0 beta release"):
>>>>
>>>> https://github.com/dasher-project/dasher/releases
>>>>
>>>> To set Dasher 5.0.0 beta to the "Direct Entry" mode, after 
>>>> installing Dasher one should go to Preferences > Application > 
>>>> Application Style.
>>>>
>>>> Currently, after the passing of Ada Majorek, the Dasher Project is 
>>>> being put forward by a group of people in England, but, it seems, at 
>>>> a very slow pace. They have announced the existence of a version 6 
>>>> beta, but this is only an online instance of Dasher, there is no 
>>>> Windows installer, as far as I know. Their web page:
>>>>
>>>> https://dasher.acecentre.net/
>>>>
>>>> For me, and possibly for other users, the Dasher version 5.0.0 beta 
>>>> for Windows that is available works perfectly well, and allows me to 
>>>> use the computer with a proficiency that would be hardly possible 
>>>> otherwise.
>>>>
>>>> Here I request that the R developers take a look at this word-typing 
>>>> issue that happens with the new R 4.2.0 on Windows.
>>>>
>>>> As an R user (I work in ecological research), I can only thank the R 
>>>> team for this really wonderful piece of statistical software that 
>>>> you make freely available to us all.
>>>>
>>>> Regards,
>>>>
>>>> Paulo Barata
>>>>
>>>> (Rio de Janeiro - Brazil)
>>>>
>>>> ______________________________________________
>>>> R-devel using r-project.org mailing list
>>>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>>
>>> ______________________________________________
>>> R-devel using r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-devel
> 
> ______________________________________________
> R-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

-- 
Dr. Benjamin Bolker
Professor, Mathematics & Statistics and Biology, McMaster University
Director, School of Computational Science and Engineering
(Acting) Graduate chair, Mathematics & Statistics



More information about the R-devel mailing list