NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Hotkey key to 'Duplicate line of code' v19


Joined: 22 Jun 2018
Posts: 3
Reply with quote
I have a Personal licence v.19, and am trying to configure a hotkey for 'Duplicate line of code'. I should like to allocate 'CTRL+D' to the task, but this is not critical. I have seen another thread suggesting to add the code '<shortcut shortcut="16452">Ctrl+D</shortcut>' to the phped.cfg file, but my phped.cfg file already contains this line. CTRL+D is by default allocated to the PageDown command, but obviously this can be removed.
A friend is using an old version - v8 or v9 - and CTRL+D duplicates the current line, with no need to select any code, immediately below. He cannot remember whether he added this himself or not.
In the above snippet, can the code '16452' simply be altered to point to the same function called by the 'EDIT/Duplicate Block or Line' menu function? If so, with which value do I need to substitute 16452?
Of course, if there is an easier way - then I should be grateful for any advice. Many thanks.
View user's profileFind all posts by Noseve99Send private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
you'd better try Tools->Settings->Editor Shortcuts

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 22 Jun 2018
Posts: 3
Reply with quote
dmitri wrote:
you'd better try Tools->Settings->Editor Shortcuts


Thank you Dmitri, but that's a hint, not an answer.

I had already explored that area of the program (didn't realise that I'd have to explain this - could have saved you a reply), but was unable to find any reference to either 'Duplicate Block or Line' or more preferable simply 'Duplicate Line'. If I need to add this manually to the .cfg file, could you please let me know the required syntax? Could you please also answer my previous query about the significance of the numbers in this file, as in '<shortcut shortcut="16452">Ctrl+D</shortcut>'

The fact that the menu shows no shortcut alongside the command suggests that it won't be in the area you mentioned, perhaps?

Thanks.
View user's profileFind all posts by Noseve99Send private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
Duplicate Block Or Line command is listed there in Block Operation group under Copy block name. Different name used there probably confuse a bit. As of the numbers like 16452, they are numerical representation of the shortcuts, Ctrl+D in this particular case, but you'd better leave them all intact. Adding new lines there won't add support for new commands while all the supported commands are already listed in the GUI. Regarding menu it displays Ctrl+D if this shortcut is assigned for Copy block. If it is not assigned for you, just open Tools->Settings->Editor Shortcuts and select "Default" in Key mapping dropdown.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 22 Jun 2018
Posts: 3
Reply with quote
Thanks Dmitri, that's it. I hadn't realised the significance of 'Copy block'.

This really makes a difference to me, as I use this command all the time.

Really appreciate the help - especially on a Sunday!

Noseve99
View user's profileFind all posts by Noseve99Send private message
Hotkey key to 'Duplicate line of code' v19
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic