Editing text in a terminal window

Is it possible to unlock text printed in a terminal window? I want to print a sentence and let the user edit the sentence using the keyboard. Then I want the user to press Enter, which will update the String with the new sentence. I wrote the code to input text. The keyboard can add text, but the printed text is locked. I cant edit it. How can I unlock it?
For example...
the terminal window prints:
This is my sentence
Using the keyboard, you can scroll through the sentence and maybe change it to:
This is your sentence

Hi hg,
The "terminal window" that you talk about is supplied by the
operating system, you can only edit stuff in it if the OS (Windows,
whatever) lets you. I haven't seen an operating system that lets
you do this - not after the whole line is written.
So the answer is: No, you can't.
Luckily for you Java lets you create your own windows, write
text in them and let the user scroll through and change the
text. Search this site for the tutorial, and read it until you come
to "JTextPane", then you'll be in business.
Cheers,
Peter

Similar Messages

  • Editing text in a terminal window #2

    I recently posted asking if it was possible to print a line of text into BlueJ's terminal window and then to let the user edit it. I got a reply that it is not possible to edit text once it is printed. However, with BufferedReader you can input text and then edit it before entering. Is it at least possible to have BufferedReader input text to begin with and then let the user edit it?
    For example:
    You can type in "Good Bye" and then backspace "Bye" and add "Morning" and get Good Morning. Instead, can "Good Bye" be automatically written and then you could edit it?

    hi there!!
    in a fast and direct way i dont think you can...
    but you might try using the Robot to send keystrokes, but that would be too troublesome me thinks...

  • Changing mouse click text select in term windows

    Minor nit/question -
    When you click on text in the terminal window, it only selects up to a non-word character (i.e. it stops selecting at punctuation, so trying to click on Foo::Bar to select it all, it goes first to Foo (stopped by the ':') and then selects the entire line on the next click.
    Most Linux flavors seem to go by whitespace - first click selects everything that is between whitespace, even if it includes non-alpha characters (thus you get Foo::Bar with one click); then the next click selects the whole line. Having gotten used to that, the Mac behavior is... annoying.
    So - how does one change it? Can it be user-config'd?
    Thanks for any assistance.

    I have actually found out what the issue is. I have called a javascript method onblur of the text element which is present in the suggest region. This onblur method is interfering with the mouse click event of the auto complete suggestions shown. If i remove the onblur method, everything is working fine. I have simulated the issue in the html file present in the compressed folder attached herwith. In that i am actually throwing an alert on blur where as in real scenario i have some other functionalities to be handled on blur.
         For clarity i will explain the real scenario as well. When the user selects a suggestion from the auto complete div, the value will be placed in the text box and on blur of the text box, the dataset will be filtered based on the value in the text box.  Few pointers on this issue:
    The on blur functionality does not interfere when we select a suggestion using down arrow in key board.
    If i use mouse click to select then i have to wait for few milliseconds extra with the mouse clicked on the value before releasing it, so that the selected value is available in the textbox. Within this few milliseconds, the onblur function gets executed and then self.nodeClick is executed thus placing the value in the textbox. But forcing the user to keep the mouse clicked on the value for sometime will not sound good.
         Kindly advise as to how this issue could be handled.

  • Editing text in mail: text is being moved, jumps to and fro

    Anybody the same experience? When editing text in the mail window, things go crazy often when I cut and paste parts of the text, most often I've seen this with complete paragraphs (i.e. hard return somewhere at the end).
    Text is then inserted at completely different locations then where I paste the text. Often a paragraph before the actual point of insertion. Seems to be a serious flaw with the text handling in Mail. Colleagues have experienced the same issue.
    Note: also the focus on windows in Mail sometimes messes up, when I click on the front window of e.g. an open message in mail, the Finder will move to the front instead of that message.
    Work to be done boys (and girls)!

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you boot, and again when you log in.
    Note: If FileVault is enabled, or if a firmware password is set, or if the boot volume is a Fusion Drive or a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to boot and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal boot may also be somewhat slow.
    The login screen appears even if you usually login automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem?
    After testing, reboot as usual (not in safe mode) and verify that you still have the problem. Post the results of the test.

  • My MacBook Pro Retina's Bluetooth chipset unknown/odd login message on the login screen states Login Window Authentication Login window Name edit text has keyboard focus. In addition, the login screen is not remembering me

    I have been experiencing several issues with my MacBook Pro Retina mid 2012. My MBPR is scheduled to go into the depot. However, I am wondering if anyone may be able to shed light on a few issues as this is the third "official" time my MBPR is going back for service ("one depot" trip; "one authorized" dealer; several in-store visits).
    My Bluetooth is stating that the Bluetooth Chipset is Unknown (0). I also have had Bluetooth Preferences mysteriously change on me. In addition, while Bluetooth is off there are two serial modems turning on. I have turned them off, but they continue to pop up.
    In addition, when I log in, my MBPR is not remembering me and my login name is not appearing on the slate-gray screen. The name and password are blank and the following message appears in the lower left hand corner. "login window authentication login window Name edit text has keyboard focus."  As a side note, I am the only user. The login issue is a recent occurrence as we just totally wiped it again via a Command + R, and I don't believe I have an accessibility setting set to anything that would cause this, but wanted to check.
    Should I be concerned here? Has anyone else had issues like this? I don't want to worry if I don't have to. I have had so many issues over the course of nine months. 5-6 wipes. Airport card replaced and I am about to pull my hair out if my MBPR doesn't come back worldly like clock work this time. I just can't send my days trying to get a $2300 product to work for me any longer. No idea what is wrong with it, but it is driving me insane. Cross your fingers for me and any guidance you have or thoughts would be welcomed. Thank you. EMM

    A few more issues...
    In Console, the following is greyed out:
    User and Diagnostic reports
    Com.apple.launchd.peruser.0
    Com.apple.launchd.peruser.88
    Com.apple.launchd.peruser.89
    Com.apple.launchd.peruser.92
    Com.apple.launchd.peruser.97
    Com.apple.launchd.peruser.200
    Com.apple.launchd.peruser.201
    Com.apple.launchd.peruser.202
    Com.apple.launchd.peruser.212
    *[user logs are accessible]
    Krb5kdc
    Radius
    My guest files are locked, but again I am the administrator of MBPR.
    I am worried about a keystroke logged or at least, trying to rule it out.
    Also:
    Mdworker32(225) [and other mdworker numbers] are sandboxing; stating deny Mach-lookup
    Com.apple.Powermanagement.control, etc. long attachment with those files with version: ??? (???).
    Postinstall: removing applications/Microsoft Office 2011/Microsoft Outlook.app
    WARNINGS in Console include:
    [NSImage compositeToPoint:fromRect:operation:fraction:] is deprecated in MacOSX 19.8 and later. Please use -[NSImage drawAtPoint:fromRect:operation:fraction] instead.
    There are a ton of other warnings. Before I go through this again, can someone tell me if this is normal (all of it -- above too); or if these are symptoms is a keystroke logger or hardware issues? 
    I ask because originally, when my computer went in for diagnostics (more than once), Apple stated the hardware was fine (other than Airport Card -- finally). However, if I've done 5-6 total wipes; created new users; do not have sharing set-up; have not played around in Terminal; and am up-to-date with versions -- and various issues KEEP COMING BACK -- I am left wondering if a keystroke logger would be possible here?!? I thought maybe a faulty logic board, but why would diagnostics be okay, then? Not trying to be hyperbole, just desperate.
    Please help me rule keystroke logger out or at least, tell me so I know, so I can take appropriate action. If you think it could be the logic board with symptoms above, that would be a great too.
    All I want to do is use the computer as intended, but I can't seem to get a real answer, so after nine months -- I am turning to the communities to see if anyone -- anyone at all -- can help. The last thing I can do is have the MBPR come back from the depot and the same thing occur. Any guidance or advice would be so gratefully appreciated.

  • Remotely editing text files in Windows WinRM/PSExec/Powershell/cmd

    Hi!
    How can I remotely edit a text file in Windows?
    I am running and administering a number of Windows 7 workstations and Windows Server 2012 machines. I would like to be able to remotely edit text files on any of these machines. I can connect to any of these machines via psexec or powershell remoting. I
    can also connect via rdp, but for the workstations I would rather not kick the user off unless I absolutely have to.
    For example, we manage state configuration using
    Salt. Local configuration files are stored in C:/salt/conf. I would like to be able to edit these config files on the fly.
    This question on Stack Overflow covers the same topic, but none of the answers are particularly satisfying. Some of the possible solutions
    are:
    Remote Desktop: as I say, I would rather not have to kick a user off their workstation
    Edit a file over a UNC path: this only works for files on a share, and setting up arbitrary shares for quick edits seems like a bad idea.
    Install some manner of ftp or ssh server on all the target computers. This would certainly work, but it is it necessary with WinRM already active? I feel like installing and configuring extra software across all the machines in my organisation would be
    a last resort.
    Edit with a command line editor (e.g. vim, emacs) over a remote powershell session. This doesn't work. I don't understand the technical details, but a powershell remote session isn't interactive in the same way that ssh connections are.
    Edit using powershell's -replace operator, out-file and add-content cmdlets. This works, but is hardly the same as a fully featured text editor.
    Retrieve content from the remote, edit locally, and post back to the remote. This works, and is arguably the best solution I've found. Code sample from SO:
    PS C:\Users\Meredith> Invoke-Command -Session $ps -ScriptBlock {get-content c:/inetpub/myapp/web.config} > web.config
    edit web config
    PS C:\Users\Meredith> get-content web.config | Invoke-Command -Session $ps -ScriptBlock {set-content c:/inetpub/myapp/web.config}
    The last two options are the workflow that I've been using for now. Regex replacement for very simple changes, and copying to local and editing there for more complicated ones. Neither is ideal, but they work. It just feels incredibly old fashioned.
    I'm considering writing a plugin to my editor of choice (vim) to perform the remote fetch and save, to make my workflow a little bit smoother. Before I try that, I just want to know if there's anything that I've missed, or misunderstood.
    Cheers

    What is the "redirector"?
    I posted the same question to Stack Overflow, and was told about administrative shares. I wasn't aware of this, and it's exactly what I wanted. I can open the filetree of a remote machine with the path \\machinename\c$\. Perfectly simple, now that I know
    the answer.

  • Editing text on a Mac (Acrobat 9) causes text to show on Windows as ellipses

    I'm a relative newbie to editing in Acrobat and forms but I'm usually a quick learner..
    What I'm seeing is when I take an existing form with largely Helvetica Neue and edit the form on a Mac (my principle machine),
    when I try to view the form on a Windows machine in Adobe reader, ellipses (look more like bullets) appear where my edited text is. 
    Funny thing is it is only the text I've edited within a single text box.  
    For example,  if I started with
    The fox jumps over the hen
    And I edit it to say
    The fox jumps under my bed
    What I see on Windows Acrobat reader is
    The fox jumps * ** ** ***  ***  
    (using *'s in this form as the bullets I'm seeing aren't easily available)
    Anyone have any suggestions or ideas?
    ==Forrest

    There are several fonts listed...
    HelveticaNeue (Embedded Subset)
    HelveticaNeue (Embedded)
    HelveticaNeue
    HelveticaNeue (Embedded Subset)
    HelveticaNeue,Bold
    HelveticaNeue-Bold (Embedded Subset)
    HelveticaNeue-Bold (Embedded Subset)
    TimesNewRoman,Bold
    What's weird is I literally edited a small amount of text within text boxes (I did not add any new text
    boxes because I don't have the original source document).  The font properties for these text boxes
    is set at the text box level and only the text I edited is unviewable on the windows machine.  The
    text I did not disturb displays correctly.
    ==Forrest

  • I have hp printer scan in windows 8 but i cant edit text when it pull up on windows 8

    I have windows 8 on dell lap top with hp all in one printer scanner Scanning works great but when it pull up on screen it will not let me edit

    Hello wanda10,
    Welcome to the forums!
    For scanning, and being able to edit the text after. I have included the document 'HP Multifunction Printers - How to Scan: Windows 8'. Read through the document, and about a quarter of the way down, it has an option for How to scan as editable text (OCR). Please let me know if this option works for you.
    If not, I would like to confirm some further information with you.
    1. What is the model number of your printer. I have included the document 'Guide to finding your product number'.
    2. What program are you using to scan with?
    3. Is the full featured software installed for the printer?
    Thank you.
    I worked on behalf of HP

  • Can't Drag Text from Terminal Window to Mail

    I can drag and drop text from Mail to the Terminal window but not the other way around. I can drag text from Terminal to Word but not Mail. Is there a setting I have wrong somewhere?

    Do we know if this is in the plasn for 10.5? It just seems like one Apple app to another Apple app should be abel to drag and drop text. It does work from Mail to Terminal... I can always copy and paste the text but it just gnaws away at me I guess.

  • App for editing/reading/writing Excel, Word, Windows notepad text documents

    I was wondering if any of you's could recommend some apps (from experience) that would allow me to, edit/read/write Excel, Word, Windows notepad text documents.
    I could make do with an app that would do the above but without the ability to create, edit Windows notepad text documents. But been able to read, write, edit Word and Excel documents would have to be a must.
    Thanks in advance.

    Thanks everyone for the help it was much appreciated.
    After debating, I decided on Docs To Go at £9.99. For this amount its a universal app and as such I can have it installed on my iPhone as well as my iPad (which is what I have done), so £5 for to have it on each device is good value I feel. Quick Office on the other hand would have cost £8.99 for the iPad version and £5.99 for the iPhone version a total of almost £15, which is quite a bit more than I paid for Docs To Go.
    Upto now, I find Docs To Go does everything I want from it, with regards to editing, reading, writing my Excel files. I tried transferring a Microsoft Windows Notepad text document over to the iPad/iPhone, I was able to read this and also add additional text/words to it and save it too. I do use text documents sometimes because if I want to add them onto a friend's computer for example, I know that they will be able to read them because with them having a Windows PC and also my friend does not have the Microsoft Office program on their PC.
    The transferring of files from the computer to the iPhone/iPad is done via a free download of the Docs To Go desktop software program (which is both PC and Mac) compatible). You first need to go into the Docs To Go app and select 'ADD DESKTOP'. This then allows you to add a device to the Docs To Go desktop program thus enabling transfer. You are shown a pin number on the screen which you enter into the Docs To Go app, this procedure only needs to be done once.
    The Docs To Go desktop program creates a folder during installation, where all the files etc are stored that are transferred/going to be transferred over are kept.
    Some people might think needing to use a program to transfer files over is a bit of a nuisance, when other similar programs allow transfer via a web browser. Personally I find that those programs, the transfer is a bit cumbersome and can be a bit slow. I find the transfer via the Docs To Go desktop program is a lot easier and faster than using the web browser. The only downside I can see with needing to use the Docs To Go desktop program is that.. If I am at a friend's house and want to transfer something on to my iPhone/iPad. My friend would need to install the program, but saying that, its a very small program and its not a big deal having to install it. If they didn't want to install it, then there is either emailing the file or transferring the file to my Dropbox account. I forgot to mention that Docs To Go supports cloud/online storage such as Dropbox, GoogleDocs as well as others.
    Once the above is done, you switch the wifi on, load the Docs To Go app, load the Docs To Go desktop program. You then just drag and drop the folders etc that you are wanting transferred over into the The Docs To Go desktop program, then you click on the circular arrow button and they are then transferred over onto the iPhone/iPad.
    Once on the iPhone/iPad, you can view them, add additional information, when you make any changes you can press the circular arrow symbol (bottom left of the Docs To Go app) on the Docs To Go app and the changes are then synced back to the same file that is stored on the computer, so its very easy to keep everything in sync and up to date.
    It is possible whilst using a Microsoft Word document to have a word count, you just touch the symbol at the bottom right of the Docs To Go app and choose Word Count from the drop down menu. I have heard a few people in some reviews saying that 'Docs To Go doesn't have a word count', when indeed it does.
    One surprise is that Docs To Go, does not have a spell checker, but hopefully during later updates, the feature might be added. I sent my feedback to Docs To Go requesting this feature on future releases. I expect that there will be many other people who have requested this feature too.
    I just thought I would share my experience with using Docs To Go.
    Thanks again everyone for the help, it was much appreciated

  • Is it possible in windows itunes to capture (copy) a playlist display as editable text?

    is it possible in windows itunes to capture (copy) a playlist display as editable text?

    Thanks for the reply, ed2345.
    I had found similar suggestions in the archived support files, but thought perhaps something had been added in the recent versions that would more directly address such an obvious need. I had used iTunes on the Apple Mac OSX platform, which provides a direct copy/paste to text file procedure (for the entire playlist display). It was a bit of a surprise to find that the Windows version did not.
    I have tried both of the suggested methods, and found the Excel routine to be the best for my needs. I have not found a way to control the massive amounts of information supplied by the Export method.
    Thanks again for the reply. It served to confirm my fears that there was no direct copy/paste routine.

  • Difficulty editing text in iPhoto book project.  I add a page layout with text, but can't edit the text box., Difficulty editing text in iPhoto book project.  I add a page layout with text, but can't edit the text box.

    I'm am having difficulty editing text in the iphoto book project.  I have a text box that is pre-populated with text.  I can edit the text once, then if I need to change something, it won't let me delete anything, only add to it.  Anyone else having this problem?
    Thanks!

    You should be able to double click in the text box and add or delete text. First  make a temporary, backup copy (if you don't already have a backup copy) of the library and try the following:
    1 - delete the iPhoto preference file, com.apple.iPhoto.plist, that resides in your
         User/Home/Library/ Preferences folder.
    2 - delete iPhoto's cache file, Cache.db, that is located in your
         User/Home/Library/Caches/com.apple.iPhoto folder. 
    Click to view full size
    3 - launch iPhoto and try again.
    NOTE: If you're moved your library from its default location in your Home/Pictures folder you will have to point iPhoto to its new location when you next open iPhoto by holding down the Option key when launching iPhoto.  You'll also have to reset the iPhoto's various preferences.
    NOTE 2:  In Lion and Mountain Lion the Library folder is now invisible. To make it permanently visible enter the following in the Terminal application window: chflags nohidden ~/Library and hit the Enter button - 10.7: Un-hide the User Library folder.
    If that doesn't help launch iPhoto with the Option key held down and create a new, test library.  Import some photos, create a book  and check to see if the same problem persists. Post back with the results.
    OT

  • NVidia GTX 770M boots to blank terminal window

    Apologies if this ends up being a trivial question but I've been Googling for a while and nothing has worked so far.
    I have a laptop with an NVidia GTX 770M Optimus card and I'm struggling with display issues with the NVidia drivers. Before installing the drivers the machine booted to the DM fine, but after installing them and generating an xorg.conf with the NVidia tool it will only boot to a (virtually) blank terminal window. The only message that appears is:
    /dev/sda4: clean, 242320/15179776 files, 2408585/60689590 blocks
    Occasionally this is accompanied by some text about starting services, but the cursor always remains blinking at the end of the process and the login window does not appear. The window is not technically black like if there were no display being rendered at all. Ctrl-F2 etc. to get into terminal modes works fine.
    Strangely enough, if I remove xorg.conf then I can reach the login screen fine, so I'm assuming this is a problem with X. There appears to be no xorg log no matter where I look. I've also tried installing the linux-mainline kernel under advice from other posts but with no success. Bumblebee is installed and set up to start on boot.
    My xorg.conf
    lspci | grep VGA
    Let me know if there's any more information I need to provide.
    Last edited by x6herbius (2014-06-17 23:35:08)

    I'm definitely no expert here at all, so none of this may be helpful. I have an Optimus setup myself, and I used it with Bumblebee (the Wiki has instructions). I had no problems booting and I never used an xorg.conf. This seems to echo what you are saying.
    Your posted xorg.conf seems to be faulty though -- at least for using the "Optimus" setup whereby BOTH cards are used. If you only want to run on your nVidia card and bascially cut out the Intel one, the xorg.conf needs some tweaking (again, see the Wiki). But you will also have to REMOVE the Intel drivers from your machine -- at least I did.
    I am not at home right now, so I can;t post my xorg.conf for you. (The Wiki has a copy, though.)
    Note: My card is a GTX730M, not a 770. This may also make a difference.

  • Closing Terminal window tabs shrinks Terminal window height

    Open a Terminal window, press Command-T to create a tab, and then Ctrl-D to close that new tab, the Terminal window height decreases by one row.
    This most certainly appears to be a bug. How do I report this to Apple?

    I am also experiencing this problem, however if you use the Basic setting the problem doesn't exist.
    I am using Novel and I have the problem. It's quite annoying.
    I noticed that if you set the fontsize to 12 then this problem exhibits, however if I change the size to 11pt or 10pt (10 is the default for Basic, 12 is default for Novel) then I don't have the bug.
    Message was edited by: TonyKL

  • (SOLVED) Closing a terminal window

    When I am through using the terminal window, I hit the X at the top right corner but get this message: There is still a process running in this terminal. Closing the terminal will kill it.
    Why do I get this? I think I have nothing running. is there a bug?
    Last edited by mcduling (2011-12-19 22:23:54)

    It is complaining because you are still running su. That's a fair warning, not a bug.
    If you don't like it, use sudo instead. It's safer anyway than leaving a terminal sitting around in su-mode for arbitrary lengths of time.
    Edit: btw, if you have run su to gain root access, and you want to close the terminal, you can get out of su by typing "exit". Then you should be able to close the terminal.
    But really, don't use su. That's just asking for trouble. Sudo is your friend.
    Last edited by /dev/zero (2011-12-19 09:59:43)

Maybe you are looking for