Write alt - enter key combination to file?

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>?

There's no such thing as a character for alt or enter. They're sometimes called meta-keys, and what an application does when they are pressed is up to the application. Usually enter creates a line break, but even then, the characters that make up a line break are platform dependent.
Explain what you are trying to accomplish, and we can probably suggest a better way to do it.

Similar Messages

  • DOWN Traversal out of JTextArea using SHIFT+ENTER key combination.

    Hi folks
    I slightly modified the focus-traversal code presented in Java Tutorial (http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html) to replace the CTRL+TAB combination with SHIFT-ENTER (because it is easier to type) but the code does not work. The code in the tutorial works for just ENTER key only. Am I making any mistake? Can anyone help me on this?
    Thanks in advance.
    Asif

    Thanks for your reply, Srinath. Following is the code (in hyphenated borders):
    =====================================================================
    Set forwardKeys = getFocusTraversalKeys(
    KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS);
    Set newForwardKeys = new HashSet(forwardKeys);
    newForwardKeys.add(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, InputEvent.SHIFT_DOWN_MASK));
    setFocusTraversalKeys(KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS,
    newForwardKeys);
    =====================================================================
    Can you help me now? I would really appreciate it. Thanks
    Asif

  • Alt Gr + key combination not working in FF?

    When i wont to type for example "@" i cant because in FF combination of Alt Gr key and V are not working.
    Why the combination is not working and how i can fix that?

    I had the same problem, in my case the problem was the Firewall (COMODO). I set the Firefox program without permission to access to the keyboard, the most of keys worked perfectly but ALTGR+Any didn't work. Try to allow access to the keyboard to firefox program if you has any firewall with proactive defense.
    I hope this solve your problem.
    Regards,
    Blackmoon

  • Any Alt + Shft key combination freezes Photoshop CS4

    Any key combination that also involves simultaneously pressing the alt and shft keys freezes Photoshop CS4 on my WinXP laptop. Is this a known bug or peculiar to my system? Killing all unnecessary processes running in the background doesn't help, so it doesn't seem to be a software conflict. Other than remapping all the relevant shortcut keys is there anyway to solve this problem?
    And how would I go about remapping the ctrl + shf + alt + e key combo. I've looked for it in under Edit\Keyboard Shortcuts\Layer but can't seem to locate it.
    Thanks.

    Thanks for the tip Chris. Yes, it seems to be a software conflict after all. Running Photoshop in Safe Mode (something that should have occcured to me earlier), the alt - shft problem disappears. Now it's just a matter of trying to isolate the culprit. Once I've found it, I'll post the solution.

  • Rename files using Enter key

    Using the Enter key to rename files and folders works only with items in the desktop. Everywhere else I need to use Command+Enter. Any one experiencing this behavior? Any ideas on how to make it work as it should (only Enter needed)?

    Thanks Bazsl,
    Lua is the language chosen by Adobe for plugins. It's also the language used for some of Lightroom proper.
    PS - In my opinion, Lua is a great little language, although the plugin environment is limited..

  • Windows 8.1 Alt + F4 key stops working

    After waking a new Samsung laptop from sleep, the Alt F4 key combination fails to close the desktop window with the focus.  The correct behaviour can be restored by carring out a full shutdown (shutdown.exe /s /f /t 00) and restart.  I am unable
    to test the action with the on-screenkeyboard (OSK) as the Windows 8.1 OSK does not have function (F) keys.
    My laptop is not connected to a domain and is of unmodified, factory (OEM) Windows 8 build, purchased in June 2013. Windows 8.1 was installed in November 2013.  I have no infomation on whether this issue was introduced before or after SP1 was installed
    Please advise how I can to prevent the Alt + F4 key combination failing to work after waking the laptop from sleep?

    Check with your System Maker's Support and their forums. Does your system have an
    F-Lock key that needs to be toggled?
    Some laptops have utilities which program the F keys which could be causing the issue.
    Check the StartUp Programs.
    How to perform a clean boot to troubleshoot a problem in Windows Vista, Windows 7,
    or Windows 8
    http://support.microsoft.com/kb/929135
    Other programs to help :
    Autoruns - Free - See what programs are configured to startup automatically
    when your system boots and you login. Autoruns also shows you the full list
    of Registry and file locations where applications can configure auto-start settings.
    http://technet.microsoft.com/en-us/sysinternals/bb963902.aspx
    Process Explorer - Free - Find out what files, registry keys and other objects
    processes have open, which DLLs they have loaded, and more. This uniquely
    powerful utility will even show you who owns each process.
    http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx
    Hope this helps.
    Rob Brown - Microsoft MVP <- profile - Windows Expert - Consumer : Bicycle <- Mark Twain said it right!
    Rob Brown -
    Microsoft MVP <- profile - Windows Expert - Consumer : Bicycle - Mark Twain said it right.

  • Enter key not producing hard returns

    Suddenly, my enter key is producing soft returns instead of hard returns. After trying to fix it for hours, I found out that hard returns are produced only with the alt+enter keys. Somehow they are reversed. What can I do?

    To enable the enter key one uses shift+return and that gives you a soft return. If you want a hard return just press the return key.

  • How to restart swing application by using shotcut key (ex :CTRL+ALT+ENTER)

    Hi,
    Currently my swing application freezs some times, it will not come back, only option i have is restart.
    Can some one can help me how i can implement short cut key (CTRL+ALT+ENTER) that can restart my application. (in any state, my action should allow to restart).
    Thanks
    Anjan
    Edited by: 807057 on Nov 2, 2010 9:16 AM

    Currently my swing application freezs some times, it will not come back,I would work on fixing that problem. Sounds like you aren't using Threads properly and are blocking the EDT. Read the section from the Swing tutorial on [url http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html]Concurrency for more information.
    how i can implement short cut key (CTRL+ALT+ENTER) that can restart my application.Within Swing this would be done by using "Key Bindings". A section on Key Binding is found on the tutorial link from above. However, is Swing actually is frozen then this won't work.
    Therefore this would need to be done at the OS level, which java doesn't support. You would need to use JNI, which I know nothing about.

  • Key binding won't work with alt-up and alt-left arrow combined

    I was playing with key binding trying to create a small app where a timer is started with the press of an alt-arrow key and stopped when the key is released. The timers append Strings to a JTextArea telling which alt-arrow key is currently pressed.
    This program works, and in fact if you press a combination of any two keys, both timers will work simultaneously, that is unless you press both up arrow and left arrow together. Can anyone see a bug in the program that explains why it won't work for these two particular keys when combined? Thanks in advance, Pete
    My SSCCE,
    KeyBindingEg.java
    package javaforum2009;
    import java.awt.BorderLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.InputEvent;
    import java.awt.event.KeyEvent;
    import javax.swing.*;
    public class KeyBindingEg {
      // parallel arrays -- sorry
      private static final int[] ARROW_KEYS = {
          KeyEvent.VK_UP, KeyEvent.VK_DOWN,
          KeyEvent.VK_LEFT, KeyEvent.VK_RIGHT };
      private static final String[] ACTION_STRINGS = {
        "Up", "Down",
        "Left", "Right" };
      private static final String PRESSED = "PRESSED";
      private static final String RELEASED = "RELEASED";
      private static final int TIMER_DELAY = 100;
      private JPanel mainPanel = new JPanel();
      private JTextArea textArea = new JTextArea(20, 30);
      public KeyBindingEg() {
        JPanel northPanel = new JPanel();
        northPanel.add(new JLabel("This JTextField has the focus: "));
        northPanel.add(new JTextField(10));
        textArea.setEditable(false);
        mainPanel.setLayout(new BorderLayout());
        mainPanel.add(northPanel, BorderLayout.NORTH);
        mainPanel.add(new JScrollPane(textArea), BorderLayout.CENTER);
        setBindings();
      private void setBindings() {
        int context = JComponent.WHEN_IN_FOCUSED_WINDOW;
        InputMap inputMap = mainPanel.getInputMap(context);
        ActionMap actionMap = mainPanel.getActionMap();
        for (int i = 0; i < ARROW_KEYS.length; i++) {
          // timer is started on key press and stopped
          // on key release.
          Timer timer = new Timer(TIMER_DELAY, new KeyTimerListener(
              ACTION_STRINGS));
    timer.setInitialDelay(0);
    // get input maps for all alt-arrow keys for both key press
    // and key release
    inputMap.put(KeyStroke.getKeyStroke(ARROW_KEYS[i],
    InputEvent.ALT_DOWN_MASK, false), ACTION_STRINGS[i] + PRESSED);
    inputMap.put(KeyStroke.getKeyStroke(ARROW_KEYS[i],
    InputEvent.ALT_DOWN_MASK, true), ACTION_STRINGS[i] + RELEASED);
    // set corresponding actions for the two different key presses above
    actionMap.put(ACTION_STRINGS[i] + PRESSED, new ArrowKeyAction(false, timer));
    actionMap.put(ACTION_STRINGS[i] + RELEASED, new ArrowKeyAction(true, timer));
    @SuppressWarnings("serial")
    private class ArrowKeyAction extends AbstractAction {
    private boolean onKeyRelease;
    private Timer swingTimer;
    public ArrowKeyAction(boolean onKeyRelease, Timer swingTimer) {
    this.onKeyRelease = onKeyRelease;
    this.swingTimer = swingTimer;
    public void actionPerformed(ActionEvent arg0) {
    if (onKeyRelease) {
    swingTimer.stop();
    } else {
    swingTimer.start();
    private class KeyTimerListener implements ActionListener {
    private String actionString;
    public KeyTimerListener(String actionString) {
    this.actionString = actionString;
    public void actionPerformed(ActionEvent arg0) {
    textArea.append(actionString + " pressed\n");
    public JComponent getPanel() {
    return mainPanel;
    private static void createAndShowGUI() {
    JFrame frame = new JFrame("KeyBindings Example");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(new KeyBindingEg().getPanel());
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
    public static void main(String[] args) {
    javax.swing.SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    createAndShowGUI();

    camickr wrote:
    I noticed the problem a while ago with a similiar example and asked the same question to which nobody could give an explanation. The same observations seem to apply to your example in that using the numpad arrow keys work without a problem.
    [http://forums.sun.com/thread.jspa?threadID=5176816]
    Yes indeed. I suppose (as always) I should have searched the forum first before asking the question. Thanks for the link and info.
    /Pete

  • Alt+ key combination shifts focus to menu

    Hi All,
    In 10g, we have mapped Alt+F1 for a user-defined action.
    However once the action is completed, the focus shifts to the menu.
    When we use another combination like Shift+Alt+F1, this does not happen.
    Any clues as to why the focus shifts to menu?
    Thanks in advance
    Rajesh.R

    That may be happening because you have the same key combination specified in your menu.
    Are you using the default Oracle Forms menu???
    Tony

  • Using the Alt Key combination

    Hi,
    I am using the alt-key combination, Alt-9734, to produce this star ☆ in a marquee I created in DW 5.5. Works fine in IE but not Safari or Chrome. In these two browsers the star is showing as,
    ☆  ☆  ☆   , any ideas. Thanks,
    Frank

    You could use the following html entity code in your source view where you want the star, remove the spaces...
    & # 9734 ;
    or
    & star ;
    Here's a  reference page for all of the other speical characters..
    http://dev.w3.org/html5/html-author/charref

  • Re: Using Alt-Key combinations

    Unfortunately this happens not only with Alt-Key combinations. It also
    happens with the ordinary F10 key: Windows activates the menu and then
    Forte gets the FKey event. The problem is that now the user has to press
    ESC to deactivate the menu and continue normal processing. There is no
    known cure yet...
    Tony Elmore wrote:
    >
    We are attempting to use Alt-Key combinations for a shortcut key combination
    for push buttons using the SetAsFunctionKey method and FunctionKeyPress
    event. When we press the Alt-Key combination, it appears that Windows is
    trying to find a menu item with that shortcut combination or a button with
    that combination. Since Windows can not find the proper element with that
    combination, it beeps at us. At that point, Forte picks up the key
    combination and will post the FunctionKeyPress event.
    The application will work fine, but the beep is not only annoying, but also
    is misleading for those individuals using accessibility tools like screen
    readers who rely upon audible queues for detecting errors in keyboarding.
    Has anyone found any viable solutions to this problem?--
    Dr. Thomas Kunst mailto:[email protected]
    sd&m GmbH & Co. KG http://www.sdm.de
    software design & management
    Thomas-Dehler-Str. 27, 81737 Muenchen, Germany
    Tel +49 89 63812-221 Fax -444
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    petelewis wrote:
    Mr.Elendig wrote:it returns ^[a as it should.
    Ah ha - okay. So you're using escapes too, rather than meta8 (this is the default, so makes sense). Yeah, I got it working doing that, but had to adapt my .vimrc to get it to acknowledge the ^[ as "alt". Didn't you, or did a simple map of e.g. <A-a> suffice?
    Are you running it in screen/tmux btw? and what is your TERM set to?
    Yeah, I thought that too and though I do run it in tmux usually, I've been testing it both with and without (TERM is set to screen-256color BTW) and it made no difference. Still, unless I specifically map the ^[ to alt in vim, it doesn't work. With meta8 it works so long as the locale is not UTF-8.
    Guess I've got a workaround for now, but it would be nice if meta8 and utf-8 worked nicely together.
    Thanks.
    Could you please show how your vimrc looks like? I have the same problem and I'm interested in your workaround.

  • Upload file in to SAP for 'ENTER' key delimited

    Hi SAP gurus,
    I have one issue while uploading the textfile into sap the file is contains 16bit char i.e. chinese char and req is as below
    there are many records in the file and i need to identify the next record by identifying ENTER key pressed.Insted of TAB key here its a ENTER key
    so please tell me how to achieve this i am using GUI_UPLOAD to upload text file.
    I want to identify where the enter key is pressed in the text file by reading ascii value of ENTER KEY will help me to find the starting of second record .
    The file format is as follows
    mmmm~~??????
    1~20110101~20111231
    //???: FIRST RECORD
    0~00130698114013434412011042604823700000913.030.172.22TestingCustomer310104120000000???????????????130601000000000??????532611-3357211??~~~
    0~CECLOR SUSP125EA13.030.172.2213.030~1510 FROM HERE SECOND RECORD its came after pressing enter
    1~0013069811401234512011042604823700001013.030.172.22Testing Customer310104120000000???????????????130601000000000??????532611-3357211??~~~
    0~CE125 6 XEA13.030.172.2213.030~1510
    Thanks
    Nirmal

    Are you sure that it's a ENTER key and not CR or CRLF (hex 0D0A)? 
    If it is CRLF (carriage return-line feed, you can check by looking at the Hex value of the string), you can split as described in this thread:
    How do I TRULY remove the CRLF (#) from the last field read in CSV dataset?
    Or see the  class: cl_abap_char_utilities=>NEWLINE or FORM_FEED for other possibilities. 
    for instance: 
    do.
    split (your input line) at cl_abap_char_utilities=>newline into line.
    if sy-subrc ne 0.
    exit.
    endif.
    append line  to internal table.
    enddo.
    The easiest way to process this would be to have the file come to you as lines of data with horizontal tab delimiters, without those multiple tildes, since that's something else you will have to deal with.
    Edited by: DaveL on Aug 1, 2011 7:58 PM

  • Key combination Shift+Alt+Cmd+D does not work in Indesign CC, why not?

    Key combination Shift+Alt+Cmd+D does not work in Indesign CC, why not?

    Is it assigned to something in the shortcut set you are using?

  • Separeted enter key / new line Txt File

    Hi Experts;
    I want to send mail with attach file (xxx.txt).
    xxx.txt file's source itab.
    I'm seeing xxx.txt file at mail.. But It's not separeted enter key / new line.
    I'want to see line-by-line my itab at the xxx.txt file.
    How can I make?
    Best regards.

    Hi, Melih.
    Try to insert new lines using cl_abap_char_utilities=>newline.
    Like this:
    DATA:
      BEGIN OF gs_tab,
        string TYPE string,
      END OF gs_tab,
      gt_tab LIKE TABLE OF gs_tab WITH HEADER LINE.
    gt_tab-string = 'first row'.
    APPEND gt_tab.
    CONCATENATE 'second row' cl_abap_char_utilities=>newline INTO gt_tab-string.
    APPEND gt_tab.
    gt_tab-string = 'third row'.
    APPEND gt_tab.
    Best regards,
    George Shlyahov.

Maybe you are looking for