Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 07:12 02 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : HELP needed with Cut/Paste on RPi (PuTTY)

     Page 2 of 2    
Author Message
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 1003
Posted: 01:18pm 12 Sep 2018
Copy link to clipboard 
Print this post

I remoted to my pi and can see what you are saying.
It seems that putty copies to its own buffer, not the clipboard. But google to the rescue.
1. Left Mouse Button and highlight the text to be copied in Putty
2. Place cursor in the text editor and press the Middle Button ie The mouse scroll wheel.
Works for me. I have trouble with the function keys. What are you setting to make these work.


Answer is here


regards
Gerry

PS. some mentions of both buttons together if no middle button. Not sure what you have.Edited by disco4now 2018-09-13
Latest F4 Latest H7 FotS
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2944
Posted: 02:28pm 12 Sep 2018
Copy link to clipboard 
Print this post

Hi Gerry,

From your post, step 1 does not copy to any clipboard on the Rpi. Only Ctrl-Ins after highlighting it copies to PuTTYs clipboard.

I have a two-button trackpad. Tried both buttons together in Text Editor but no joy. Ētrl-v, and also 'Paste' from menu still no joy

This is driving me mad!
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 1003
Posted: 05:38am 13 Sep 2018
Copy link to clipboard 
Print this post

I have connected up a screen, keyboard and mouse with a scroll wheel.

So its working for me with:
Left Mouse and drag to select the code.
Click inside the text editor and press mouse scroll button to paste.

I downloaded and installed the mouseemu package and also was successful with F10 emulating the mouse middle button and triggering the paste.


I see the K400+ has an extra button top left as and extra left mouse.
Have you tried it when selecting.


sudo apt-get install mouseemu



Then edit the etc/default/mouseemu
file to enable F10 as mouse button
If you get it to work then I think you could pick another key if required.

# Defaults for mouseemu initscript (/etc/init.d/mouseemu)
# These are the default values on PowerPC. On all other architectures
# middle and right click are disabled by default.
# Key codes can be found in include/linux/input.h in the kernel headers
# or by using `showkey` in a console.


MID_CLICK="-middle 0 68" # F10 with no modifier
#MID_CLICK="-middle 125 272" # Left Apple Key (LEFTMETA) + click
#RIGHT_CLICK="-right 0 87" # F11 with no modifier
#RIGHT_CLICK="-right 29 272" # Left Ctrl + click
#SCROLL="-scroll 56" # Alt key
#TYPING_BLOCK="-typing-block 300" # block mouse for 300ms after a keypress



restart the mouseemu service after the edit.


sudo service mouseemu restart








Latest F4 Latest H7 FotS
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2944
Posted: 06:55am 13 Sep 2018
Copy link to clipboard 
Print this post

Thanks Gerry for that idea to try.

The 'extra mouse button' on the left of the K400+ keyboard is just a duplicate Left Button from the trackpad. It allows you to sit with the keyboard on your lap, and use your right hand on the trackpad surface, and your left hand to quickly 'left click' the mouse, all whilst holding the keyboard.

The above may sound trivial, but it is this fine detail in the K400+ design that I chose this keyboard. In my application, I am wanting to code MMs (on a wireless keyboard) in front of a large TV acting as the MM 'Terminal'.

Sorting this little issue out means I can program/control (in comfort) any MM within range of a WiFi signal.

Will see if I can utilise the above later today when I get time . . .

WW
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2944
Posted: 11:11am 13 Sep 2018
Copy link to clipboard 
Print this post

It works!!

Thanks Gerry for the MOUSEEMU pointer.

I have it working with F10 (simply edited the file as per your post).

All I need to do now is find the list of key codes for various keys. You mention Keycodes are listed in 'include/linux/input.h', or also by using ShowKey; but I have tried and got nowhere.

I do not want to use F10 as this is the AUTOSAVE shortcut for the MicroMite! So re-mapping to an unused Fkey is desired.

As a total Linux illiterate person; can you give me more guidance on where to view the list of KeyCodes. I have Google, but every answer I've seen so far assumes that I'm a Linux expert!

Thanks for your help - this is shaping up nicely now!

WW
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 1003
Posted: 11:42am 13 Sep 2018
Copy link to clipboard 
Print this post

Hi,
I have worked out a few.
At command prompt:

sudo showkey -s

This will print the code on key presses for next ten seconds.
Just re-issue it as required.

For me:
F10 returns 0x44 0xc4
F11 returns 0x57 0xd7
Left window button returns 0x7d 0xfd
right window button returns 0x7e 0xfe
menukey returns 0x7f 0xff

A bit of experimentation and the code required in the file seems
to be 0 followed by the decimal value of the first byte.ie 0x44 is 4*16+4 =68
F10 is 0 68
F11 is 0 87
Left window is 0 125
right window is 0 126
menu key is 0 127

So if you get the code of the required key with
sudo showkey -s
you should be able to workout the required file entry.

Do you still need to CNTRL + INS for the copy?

Regards
Gerry



Latest F4 Latest H7 FotS
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2944
Posted: 03:36pm 13 Sep 2018
Copy link to clipboard 
Print this post

  disco4now said  
A bit of experimentation and the code required in the file seems
to be 0 followed by the decimal value of the first byte.ie 0x44 is 4*16+4 =68
F10 is 0 68
F11 is 0 87

So if you get the code of the required key with
sudo showkey -s
you should be able to workout the required file entry.


THANK YOU for this - it solved everything.
Used F9 (value was 67) as not a shortcut key used by MMBASIC. Initially showkey did not work, but rebooted RPi and then worked as I initially hoped for!

  Quote  
Do you still need to CNTRL + INS for the copy?


No. Got COPY down to just a 'left-click & drag' (so highlighted text from PuTTY is then on clipboard that F9 now pastes wherever I need it to.

Appreciate all your help with this. . . .

WW
 
     Page 2 of 2    
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025