Recent

Author Topic: Ctrl-V doesn't work anymore  (Read 648 times)

Wings2018

  • New Member
  • *
  • Posts: 22
Ctrl-V doesn't work anymore
« on: April 25, 2025, 09:42:55 pm »
All,

Before raising this topic I checked the forum, but couldn't find a solution.

I installed FPC v3.0.4 from scratch on a new laptop and set following menu: Option -> Environment -> Keyboard & mouse -> Microsoft convention, and saved fpc.ini (the file content then showed 'EditKeys=microsoft');

When I try to copy a selected text by using ctrl-c on the keyboard it works (and even shows up in de Clipboard), and when keeping the selected text highlighted also ctr-x on the keyboard works.

Why doesn't ctrl-v work on the keyboard anymore (ctrl-v via menu Edit -> Paste works fine.)? Together with ctrl-v I tried several key combinations using 'fn' or 'alt', but nothing works. Also after closing and restarting fpc no results.

On my previous laptop it all worked fine.
« Last Edit: April 25, 2025, 10:43:29 pm by Wings2018 »

dseligo

  • Hero Member
  • *****
  • Posts: 1507
Re: Ctrl-V doesn't work anymore
« Reply #1 on: April 27, 2025, 11:41:25 am »
Maybe you have something else assigned to Ctrl+V.

Did you try Shift+Insert? Maybe is something in your OS that grabs Ctrl+V.

Select menu Tools, Options. Then go to Editor and Key Mappings.
In filter type: Ctrl+V
You should get two results:
- under 'Text selection commands' Paste (Ctrl + V and Shift + Ins)
- under 'Designer commands' Paste Components (Ctrl + V and Shift + Ins)

This is in Lazarus 3.6.
Why do you use such an old version of Lazarus?

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11130
  • Debugger - SynEdit - and more
    • wiki
Re: Ctrl-V doesn't work anymore
« Reply #2 on: April 27, 2025, 11:47:53 am »
Select menu Tools, Options. Then go to Editor and Key Mappings.

Check the forum board => this is about the fpc (command-line/shell/dos) IDE.

dseligo

  • Hero Member
  • *****
  • Posts: 1507
Re: Ctrl-V doesn't work anymore
« Reply #3 on: April 28, 2025, 01:17:51 am »
Select menu Tools, Options. Then go to Editor and Key Mappings.

Check the forum board => this is about the fpc (command-line/shell/dos) IDE.

You are correct :-[

I can confirm OP's problem, something isn't working OK.

If I select text and press Ctrl+C and then select menu Edit, Paste it pastes.
If I press Ctrl+V it doesn't Paste.

But: if I select text and go to menu Edit, Copy to Windows and after that press Ctrl+V it pastes. It is exactly the same with Shift+Insert.

So it looks that Ctrl+V does 'Paste from Windows'.

Why are they two different copy/paste in FP IDE?

TRon

  • Hero Member
  • *****
  • Posts: 4351
Re: Ctrl-V doesn't work anymore
« Reply #4 on: April 28, 2025, 01:55:01 am »
Why are they two different copy/paste in FP IDE?
A terminal application does not have any knowledge on/of the clipboard from the hosted OS. It has to rely on the terminal in use (which is not uniform).

Internal copy-paste inside the IDE itself (in theory) only has to take care of itself.

Having two copy-paste options allows to workaround in case of issues (you just experienced that yourself  :) )

It used to work as you might expect but seems something got broken.
Today is tomorrow's yesterday.

dseligo

  • Hero Member
  • *****
  • Posts: 1507
Re: Ctrl-V doesn't work anymore
« Reply #5 on: April 28, 2025, 12:02:15 pm »
Why are they two different copy/paste in FP IDE?
A terminal application does not have any knowledge on/of the clipboard from the hosted OS. It has to rely on the terminal in use (which is not uniform).

It does. See attachment - there is separate copy/paste to internal clipboard, and copy/paste to and from Windows.

Quote
Internal copy-paste inside the IDE itself (in theory) only has to take care of itself.

Having two copy-paste options allows to workaround in case of issues (you just experienced that yourself  :) )

It used to work as you might expect but seems something got broken.

Problem here is not two copy/paste. Problem is that keyboard's 'copy' shortcut copies content to internal clipboard, and keyboard's 'paste' shortcut pastes content from Windows' clipboard. Maybe it's intentional, but it isn't intuitive.

TRon

  • Hero Member
  • *****
  • Posts: 4351
Re: Ctrl-V doesn't work anymore
« Reply #6 on: April 28, 2025, 12:30:26 pm »
It does. See attachment - there is separate copy/paste to internal clipboard, and copy/paste to and from Windows.
Ok, I see. thank you for sharing.

I did not know that was a thing when running in Windows. On Linux these menu-items are not present for me. I thought you were referring to the interaction between editor <-> terminal <-> os

Quote
Problem here is not two copy/paste. Problem is that keyboard's 'copy' shortcut copies content to internal clipboard, and keyboard's 'paste' shortcut pastes content from Windows' clipboard. Maybe it's intentional, but it isn't intuitive.
Because of the above then indeed this seem a bit strange and agree with you that it is not intuitive, perhaps even confusing. Because I do not know the details of the implemented functionality I cant really provide a meaningful comment atm.

Let's see if someone else is experiencing the same issue and opt for either a request for change in behaviour or perhaps even a bug-report.
Today is tomorrow's yesterday.

 

TinyPortal © 2005-2018