ctrl-c ctril-v

R

Roedy Green

Is it possible to reconfigure copy paste to some other keystrokes
besides ctrl-C ctrl-V either within Java or Windows entirely?

They are quite inconveniently placed in a dsk layout.
--
Roedy Green Canadian Mind Products http://mindprod.com
The first 90% of the code accounts for the first 90% of the development time.
The remaining 10% of the code accounts for the other 90% of the development
time.
~ Tom Cargill Ninety-ninety Law
 
A

Andreas Leitgeb

Roedy Green said:
Is it possible to reconfigure copy paste to some other keystrokes
besides ctrl-C ctrl-V either within Java or Windows entirely?
They are quite inconveniently placed in a dsk layout.

Don't think it is possible...

Even if it were, then whatever other letters (with Ctrl) would
get the Copy and Paste functionality, they might conflict with
some appliation's use for that respective other key.

E.g., if you set Copy to Ctrl-J and Paste to Ctrl-K and maybe
even Cut to Ctrl-Q, then you may run into problems with apps
that use Ctrl-Q,J,K for other stuff.
 
A

Arne Vajhøj

Is it possible to reconfigure copy paste to some other keystrokes
besides ctrl-C ctrl-V either within Java or Windows entirely?

Within a Java GUI it should be easy.

It will not be as easy to outside of the Java GUI. And Java will
not be the right language to hook into the OS/WM/GUI framework.
They are quite inconveniently placed in a dsk layout.

But it is what people expect.

Arne
 
D

Daniel Pitts

Is it possible to reconfigure copy paste to some other keystrokes
besides ctrl-C ctrl-V either within Java or Windows entirely?

They are quite inconveniently placed in a dsk layout.
FWIW, on the Mac it is Command-C/V, which is more convenient since
Command is a thumb-pressed key, not a pinky-pressed. This is true for
most hot keys.

The equivalent on a PC would be pressing the Alt key for most hot-keys.

Having said that, a lot of applications allow you to remap hot keys, but
it is per application. No global solution that I know of. Probably
could be done.
 
B

bob smith

Is it possible to reconfigure copy paste to some other keystrokes

besides ctrl-C ctrl-V either within Java or Windows entirely?



They are quite inconveniently placed in a dsk layout.

--

Roedy Green Canadian Mind Products http://mindprod.com

The first 90% of the code accounts for the first 90% of the development time.

The remaining 10% of the code accounts for the other 90% of the development

time.

~ Tom Cargill Ninety-ninety Law

I used to use right-clicking on stuff to Copy/Paste in Windows. Or the menu bar. Or the copy and paste icons.

Sometimes if I don't like a hotkey, I'll use a Macro program, and I'll tell it to generate the Control C keystroke if I hit F12 or something. There's a program called AutoHotkey for Windows that might do that.
 
A

Arved Sandstrom

FWIW, on the Mac it is Command-C/V, which is more convenient since
Command is a thumb-pressed key, not a pinky-pressed. This is true for
most hot keys.
[ SNIP ]

I am an extremely fast two-fingered typist...to me it doesn't matter. :)

AHS
 
D

Daniel Pitts

FWIW, on the Mac it is Command-C/V, which is more convenient since
Command is a thumb-pressed key, not a pinky-pressed. This is true for
most hot keys.
[ SNIP ]

I am an extremely fast two-fingered typist...to me it doesn't matter. :)

AHS
It's not always about speed. Comfort is part of it as well. I can type
really fast with two fingers (thanks to apple iP{hone,ad,od}). My wrist
gets tired doing so for long stretches.
 
J

Jim Janney

Roedy Green said:
Is it possible to reconfigure copy paste to some other keystrokes
besides ctrl-C ctrl-V either within Java or Windows entirely?

They are quite inconveniently placed in a dsk layout.

This is a good thing. Programmers should not copy/paste on a regular
basis.

But on Windows I normally use control-insert/shift-insert anyway. No
need to reconfigure anything, it already works. That's the key marked
"Ins", just left of the home key.
 
L

Lew

Jim said:
This is a good thing. Programmers should not copy/paste on a regular
basis.

Ridiculous assertion.

I'm a programmer, and a good one at that, and I copy/paste dozens or hundreds
of times a day.

Code.
 
J

Jim Janney

Lew said:
Ridiculous assertion.

I wan't entirely serious when I wrote that. However...

Any time I find myself faced with a lot of similar code, I do start
looking for ways to abstract out the similarities, in whatever language
I happen to be working in. Java is particularly rich in ways to
accomplish this. And for really trivial boilerplate code, any good
programming editor should provide ways to generate that that are both
more flexible and less error-prone than simple copy/paste. Again,
Eclipse is particularly rich in ways to accomplish this.

I stand by my ridiculous assertion :)
 
L

Lew

Jim said:
I wan't entirely serious when I wrote that. However...

Any time I find myself faced with a lot of similar code, I do start
looking for ways to abstract out the similarities, in whatever language
I happen to be working in. Java is particularly rich in ways to
accomplish this. And for really trivial boilerplate code, any good
programming editor should provide ways to generate that that are both
more flexible and less error-prone than simple copy/paste. Again,
Eclipse is particularly rich in ways to accomplish this.

I stand by my ridiculous assertion :)

It's too broad.

Let's say I have a method name 'loadResourceFromBlarg()' and I'm programming with
Eclipse or NetBeans or one of those editors. Now I could use Ctrl-space to get code
completion, but if there are a number of 'loadResourceFromXxx()' methods, the completion
list might take time. If there are many calls to the method of choice, I'll likely copy the
method name once into the clipboard and repeatedly paste it.

Let's say I'm importing static a bunch of members from a utility class.

import static junit.framework.Assert.assertEquals
import static junit.framework.Assert.assertNotNull;
import static junit.framework.Assert.assertNotSame;
import static junit.framework.Assert.assertTrue;

It's much faster to copy "import static junit.framework.Assert.assert", repeatedly paste it
and just type the part that varies.

This type of thing comes up a *lot*, so I copy and paste on a regular and frequent
basis. This has nothing to do with the refactoring of which you spoke.

You're assertion was ridiculous because it banned legitimate uses of copy-paste.
 
A

Arne Vajhøj

I wan't entirely serious when I wrote that. However...

Any time I find myself faced with a lot of similar code, I do start
looking for ways to abstract out the similarities, in whatever language
I happen to be working in. Java is particularly rich in ways to
accomplish this. And for really trivial boilerplate code, any good
programming editor should provide ways to generate that that are both
more flexible and less error-prone than simple copy/paste. Again,
Eclipse is particularly rich in ways to accomplish this.

I stand by my ridiculous assertion :)

Often code can be refactored, but sometimes it is not possible
either because of the type of code or because projects can not
depend on each other.

But there are also a lot besides Java code. Various Java EE
descriptor files, various log4j or Spring config files etc..

I think most developer do their part of copy paste.

Probably also get it wrong occasionally.

:)

Binding all this to snippet shortcuts is only practical
for a few often used pieces. It will not work for the hundreds
or thousands of more rarely used pieces.

Arne
 
R

Roedy Green

Programmers should not copy/paste on a regular
basis.

You mean should not clone code, right? Lots of copy paste is
rearranging, refactoring, building tables from external sources etc.
--
Roedy Green Canadian Mind Products http://mindprod.com
The first 90% of the code accounts for the first 90% of the development time.
The remaining 10% of the code accounts for the other 90% of the development
time.
~ Tom Cargill Ninety-ninety Law
 
J

Jim Janney

Roedy Green said:
You mean should not clone code, right? Lots of copy paste is
rearranging, refactoring, building tables from external sources etc.

That is indeed the very thing that I mean, yes :) Although for most
refactoring I find Eclipse's builtin tools superior to doing it
manually.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

video cards for Java 1
StringBuilder for byte[] 11
regex reserved chars 23
abbreviated generic syntax 14
creating byte[] with subfields 14
jdk 1.7.0_13 is out 4
probing SSL websites 1
creeping consensus 6

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top