Topics

Passing keys or entering text

Sam Byrne
 

Hi All,


I need some direction please on where to start for being able to perform standard keystrokes as part of my gestures or scripts I'm trying to write for a Putty app module. IE, I need to be able to paste the clipboard contents into a putty window, but as it is emulating a 3270 mainframe window, Control+V keystroke isn't accepted. I've tried write () but that can only be used for adding content to files, not windows or screens it seems.


How else could I write, type or import the clipboard text to the current cursor position? Please provide some basic example code if possible, as I really have no idea.


I've done some googling, but anything with using keyboard and standard python appears overly complicated for what I'm trying to achieve.


Thanks,


Sam

Julien Cochuyt
 

Hi,

Another commonly used standard paste gesture often supported in terminals is shift+insert
(Insert might need to be doubled to be passed through depending on your NVDA configuration)

To access the clipboard content programmatically with NVDA, you can use api.getClipData()

Best regards,

Julien Cochuyt
Accessolutions


Le jeu. 28 mai 2020 à 09:01, Sam Byrne <sam.byrne.90@...> a écrit :
Hi All,


I need some direction please on where to start for being able to perform
standard keystrokes as part of my gestures or scripts I'm trying to
write for a Putty app module. IE, I need to be able to paste the
clipboard contents into a putty window, but as it is emulating a 3270
mainframe window, Control+V keystroke isn't accepted. I've tried write
() but that can only be used for adding content to files, not windows or
screens it seems.


How else could I write, type or import the clipboard text to the current
cursor position? Please provide some basic example code if possible, as
I really have no idea.


I've done some googling, but anything with using keyboard and standard
python appears overly complicated for what I'm trying to achieve.


Thanks,


Sam




Sam Byrne
 

Thanks Julien,


Yes I knew of api.getClipData but how to actually get the info from NVDA memory to being entered on screen was where I got stuck. I was also unsure of how to write the actual keys that I want to pass when using passKey.


Cheers,

Sam

On 28/05/2020 5:14 pm, Julien Cochuyt wrote:
Hi,

Another commonly used standard paste gesture often supported in terminals is shift+insert
(Insert might need to be doubled to be passed through depending on your NVDA configuration)

To access the clipboard content programmatically with NVDA, you can use api.getClipData()

Best regards,

Julien Cochuyt
Accessolutions

Le jeu. 28 mai 2020 à 09:01, Sam Byrne <sam.byrne.90@...> a écrit :
Hi All,


I need some direction please on where to start for being able to perform
standard keystrokes as part of my gestures or scripts I'm trying to
write for a Putty app module. IE, I need to be able to paste the
clipboard contents into a putty window, but as it is emulating a 3270
mainframe window, Control+V keystroke isn't accepted. I've tried write
() but that can only be used for adding content to files, not windows or
screens it seems.


How else could I write, type or import the clipboard text to the current
cursor position? Please provide some basic example code if possible, as
I really have no idea.


I've done some googling, but anything with using keyboard and standard
python appears overly complicated for what I'm trying to achieve.


Thanks,


Sam




Tyler Spivey
 

KeyboardInputGesture.fromName("shift+insert").send()

On 5/28/2020 12:25 AM, Sam Byrne wrote:
Thanks Julien,


Yes I knew of api.getClipData but how to actually get the info from NVDA
memory to being entered on screen was where I got stuck. I was also
unsure of how to write the actual keys that I want to pass when using
passKey.


Cheers,

Sam

On 28/05/2020 5:14 pm, Julien Cochuyt wrote:
Hi,

Another commonly used standard paste gesture often supported in
terminals is shift+insert
(Insert might need to be doubled to be passed through depending on
your NVDA configuration)

To access the clipboard content programmatically with NVDA, you can
use api.getClipData()

Best regards,

Julien Cochuyt
Accessolutions

Le jeu. 28 mai 2020 à 09:01, Sam Byrne <sam.byrne.90@...
<mailto:sam.byrne.90@...>> a écrit :

Hi All,


I need some direction please on where to start for being able to
perform
standard keystrokes as part of my gestures or scripts I'm trying to
write for a Putty app module. IE, I need to be able to paste the
clipboard contents into a putty window, but as it is emulating a 3270
mainframe window, Control+V keystroke isn't accepted. I've tried
write
() but that can only be used for adding content to files, not
windows or
screens it seems.


How else could I write, type or import the clipboard text to the
current
cursor position? Please provide some basic example code if
possible, as
I really have no idea.


I've done some googling, but anything with using keyboard and
standard
python appears overly complicated for what I'm trying to achieve.


Thanks,


Sam



Bill Dengler
 

Tangentially related, how would I type arbitrary text with NVDA? For example, I'd like to create a script to type – And — As they're not easy to type on my keyboard layout...

Bill

-----Original Message-----
From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Tyler Spivey
Sent: 28 May 2020 03:39
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] Passing keys or entering text

KeyboardInputGesture.fromName("shift+insert").send()

On 5/28/2020 12:25 AM, Sam Byrne wrote:
Thanks Julien,


Yes I knew of api.getClipData but how to actually get the info from
NVDA memory to being entered on screen was where I got stuck. I was
also unsure of how to write the actual keys that I want to pass when
using passKey.


Cheers,

Sam

On 28/05/2020 5:14 pm, Julien Cochuyt wrote:
Hi,

Another commonly used standard paste gesture often supported in
terminals is shift+insert (Insert might need to be doubled to be
passed through depending on your NVDA configuration)

To access the clipboard content programmatically with NVDA, you can
use api.getClipData()

Best regards,

Julien Cochuyt
Accessolutions

Le jeu. 28 mai 2020 à 09:01, Sam Byrne <sam.byrne.90@...
<mailto:sam.byrne.90@...>> a écrit :

Hi All,


I need some direction please on where to start for being able to
perform
standard keystrokes as part of my gestures or scripts I'm trying to
write for a Putty app module. IE, I need to be able to paste the
clipboard contents into a putty window, but as it is emulating a 3270
mainframe window, Control+V keystroke isn't accepted. I've tried
write
() but that can only be used for adding content to files, not
windows or
screens it seems.


How else could I write, type or import the clipboard text to the
current
cursor position? Please provide some basic example code if
possible, as
I really have no idea.


I've done some googling, but anything with using keyboard and
standard
python appears overly complicated for what I'm trying to achieve.


Thanks,


Sam



Sam Byrne
 

Thanks Tyler, I'm going to need a bit more background though as I currently get:

NameError: name 'KeyboardInputGesture' is not defined


I'm still very new to this as explained earlier.

On 28/05/2020 5:38 pm, Tyler Spivey wrote:
KeyboardInputGesture.fromName("shift+insert").send()

On 5/28/2020 12:25 AM, Sam Byrne wrote:
Thanks Julien,


Yes I knew of api.getClipData but how to actually get the info from NVDA
memory to being entered on screen was where I got stuck. I was also
unsure of how to write the actual keys that I want to pass when using
passKey.


Cheers,

Sam

On 28/05/2020 5:14 pm, Julien Cochuyt wrote:
Hi,

Another commonly used standard paste gesture often supported in
terminals is shift+insert
(Insert might need to be doubled to be passed through depending on
your NVDA configuration)

To access the clipboard content programmatically with NVDA, you can
use api.getClipData()

Best regards,

Julien Cochuyt
Accessolutions

Le jeu. 28 mai 2020 à 09:01, Sam Byrne <sam.byrne.90@...
<mailto:sam.byrne.90@...>> a écrit :

Hi All,


I need some direction please on where to start for being able to
perform
standard keystrokes as part of my gestures or scripts I'm trying to
write for a Putty app module. IE, I need to be able to paste the
clipboard contents into a putty window, but as it is emulating a 3270
mainframe window, Control+V keystroke isn't accepted. I've tried
write
() but that can only be used for adding content to files, not
windows or
screens it seems.


How else could I write, type or import the clipboard text to the
current
cursor position? Please provide some basic example code if
possible, as
I really have no idea.


I've done some googling, but anything with using keyboard and
standard
python appears overly complicated for what I'm trying to achieve.


Thanks,


Sam



Rui Fontes
 

Hello!


Have you imported the module?

Something like:

from keyboardHandler import KeyboardInputGesture



Rui Fontes

NVDA portuguese team


Às 09:58 de 28/05/2020, Sam Byrne escreveu:

Thanks Tyler, I'm going to need a bit more background though as I currently get:

NameError: name 'KeyboardInputGesture' is not defined


I'm still very new to this as explained earlier.

On 28/05/2020 5:38 pm, Tyler Spivey wrote:
KeyboardInputGesture.fromName("shift+insert").send()

On 5/28/2020 12:25 AM, Sam Byrne wrote:
Thanks Julien,


Yes I knew of api.getClipData but how to actually get the info from NVDA
memory to being entered on screen was where I got stuck. I was also
unsure of how to write the actual keys that I want to pass when using
passKey.


Cheers,

Sam

On 28/05/2020 5:14 pm, Julien Cochuyt wrote:
Hi,

Another commonly used standard paste gesture often supported in
terminals is shift+insert
(Insert might need to be doubled to be passed through depending on
your NVDA configuration)

To access the clipboard content programmatically with NVDA, you can
use api.getClipData()

Best regards,

Julien Cochuyt
Accessolutions

Le jeu. 28 mai 2020 à 09:01, Sam Byrne <sam.byrne.90@...
<mailto:sam.byrne.90@...>> a écrit :

     Hi All,


     I need some direction please on where to start for being able to
     perform
     standard keystrokes as part of my gestures or scripts I'm trying to
     write for a Putty app module. IE, I need to be able to paste the
     clipboard contents into a putty window, but as it is emulating a 3270
     mainframe window, Control+V keystroke isn't accepted. I've tried
     write
     () but that can only be used for adding content to files, not
     windows or
     screens it seems.


     How else could I write, type or import the clipboard text to the
     current
     cursor position? Please provide some basic example code if
     possible, as
     I really have no idea.


     I've done some googling, but anything with using keyboard and
     standard
     python appears overly complicated for what I'm trying to achieve.


     Thanks,


     Sam



Rui Fontes
 

Do you know our FrequentText add-on?


You can find it at:

https://www.dropbox.com/s/631rs4t0xypc9u8/frequentText-1.0.nvda-addon?dl=1


Best regards,


Rui Fontes

NVDA portuguese team


Às 08:41 de 28/05/2020, Bill Dengler escreveu:

Tangentially related, how would I type arbitrary text with NVDA? For example, I'd like to create a script to type – And — As they're not easy to type on my keyboard layout...

Bill
-----Original Message-----
From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Tyler Spivey
Sent: 28 May 2020 03:39
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] Passing keys or entering text

KeyboardInputGesture.fromName("shift+insert").send()

On 5/28/2020 12:25 AM, Sam Byrne wrote:
Thanks Julien,


Yes I knew of api.getClipData but how to actually get the info from
NVDA memory to being entered on screen was where I got stuck. I was
also unsure of how to write the actual keys that I want to pass when
using passKey.


Cheers,

Sam

On 28/05/2020 5:14 pm, Julien Cochuyt wrote:
Hi,

Another commonly used standard paste gesture often supported in
terminals is shift+insert (Insert might need to be doubled to be
passed through depending on your NVDA configuration)

To access the clipboard content programmatically with NVDA, you can
use api.getClipData()

Best regards,

Julien Cochuyt
Accessolutions

Le jeu. 28 mai 2020 à 09:01, Sam Byrne <sam.byrne.90@...
<mailto:sam.byrne.90@...>> a écrit :

Hi All,


I need some direction please on where to start for being able to
perform
standard keystrokes as part of my gestures or scripts I'm trying to
write for a Putty app module. IE, I need to be able to paste the
clipboard contents into a putty window, but as it is emulating a 3270
mainframe window, Control+V keystroke isn't accepted. I've tried
write
() but that can only be used for adding content to files, not
windows or
screens it seems.


How else could I write, type or import the clipboard text to the
current
cursor position? Please provide some basic example code if
possible, as
I really have no idea.


I've done some googling, but anything with using keyboard and
standard
python appears overly complicated for what I'm trying to achieve.


Thanks,


Sam






Julien Cochuyt
 

Hi Bill,

To send arbitrary Unicode input, you can use brailleInput.handler.sendChars()


Best regards,

Julien Cochuyt
Accessolutions

Le jeu. 28 mai 2020 à 09:42, Bill Dengler <codeofdusk@...> a écrit :
Tangentially related, how would I type arbitrary text with NVDA? For example, I'd like to create a script to type – And — As they're not easy to type on my keyboard layout...

Bill
-----Original Message-----
From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Tyler Spivey
Sent: 28 May 2020 03:39
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] Passing keys or entering text

KeyboardInputGesture.fromName("shift+insert").send()

On 5/28/2020 12:25 AM, Sam Byrne wrote:
> Thanks Julien,
>
>
> Yes I knew of api.getClipData but how to actually get the info from
> NVDA memory to being entered on screen was where I got stuck. I was
> also unsure of how to write the actual keys that I want to pass when
> using passKey.
>
>
> Cheers,
>
> Sam
>
> On 28/05/2020 5:14 pm, Julien Cochuyt wrote:
>> Hi,
>>
>> Another commonly used standard paste gesture often supported in
>> terminals is shift+insert (Insert might need to be doubled to be
>> passed through depending on your NVDA configuration)
>>
>> To access the clipboard content programmatically with NVDA, you can
>> use api.getClipData()
>>
>> Best regards,
>>
>> Julien Cochuyt
>> Accessolutions
>>
>> Le jeu. 28 mai 2020 à 09:01, Sam Byrne <sam.byrne.90@...
>> <mailto:sam.byrne.90@...>> a écrit :
>>
>>     Hi All,
>>
>>
>>     I need some direction please on where to start for being able to
>>     perform
>>     standard keystrokes as part of my gestures or scripts I'm trying to
>>     write for a Putty app module. IE, I need to be able to paste the
>>     clipboard contents into a putty window, but as it is emulating a 3270
>>     mainframe window, Control+V keystroke isn't accepted. I've tried
>>     write
>>     () but that can only be used for adding content to files, not
>>     windows or
>>     screens it seems.
>>
>>
>>     How else could I write, type or import the clipboard text to the
>>     current
>>     cursor position? Please provide some basic example code if
>>     possible, as
>>     I really have no idea.
>>
>>
>>     I've done some googling, but anything with using keyboard and
>>     standard
>>     python appears overly complicated for what I'm trying to achieve.
>>
>>
>>     Thanks,
>>
>>
>>     Sam
>>
>>
>>
>>
>