The moose likes Java in General and the fly likes Write [alt]-[enter] key combination to file Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Write [alt]-[enter] key combination to file" Watch "Write [alt]-[enter] key combination to file" New topic
Author

Write [alt]-[enter] key combination to file

Michael Remijan
Ranch Hand

Joined: May 29, 2002
Posts: 103

how would I create a string with the <alt>-<enter> key combiniation in the middle of it which I can then write out to a file? Would it be as simple as outputing the unicode characters for <alt> and then <enter>?


<a href="http://www.linkedin.com/in/mjremijan" rel="nofollow">
<img src="http://www.linkedin.com/img/webpromo/btn_viewmy_160x25.png" border="0" >
</a>
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 16480
    
    2

It doesn't make sense to write a key combination to a file. It only makes sense to write characters (or bytes) to a file. Could you tell us why you want to do this?
Bill Shirley
Ranch Hand

Joined: Nov 08, 2007
Posts: 457
alt and enter are not characters,

enter or return quite often maps to "\n",

http://www.leepoint.net/notes-java/io/10file/sys-indep-newline.html
(re:content in the link, Mac OS X is Unix)


Bill Shirley - bshirley - frazerbilt.com
if (Posts < 30) you.read( JavaRanchFAQ);
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Write [alt]-[enter] key combination to file
 
Similar Threads
how to create small windows
Disabling ALT + ENTER in IE7 by using javascript.
My Access Key Does Not Work
Write [alt]-[enter] key combination to file
Multiple Submit Buttons?