How to map end key to "end of line"

Is there a way to map the "end" key so that it goes to the end of the line, rather than the end of the document? I know I can use clover-right arrow to go to end of line, but I would like to map the end key to this functionality. Conversely, I'd like to map the home key to beginning of line.
Thanks.

Your wish is quite reasonable. I don't like the Cmd left/right arrow too.
You can often use Ctrl-A to go to the start of a line and Ctrl-E to go to the end of line.
First of all, have a look at this web page by Jacob Rus:
http://www.hcs.harvard.edu/~jrus/site/cocoa-text.html
A good explanation of key related things.
In your personal Library folder create a folder KeyBindings.
Then copy the following (starting on the line with { and ending on the line with }).
(this will also make Shift Home and Shift End select to the start/end of line)
/* home */
"\UF729" = "moveToBeginningOfLine:";
"$\UF729" = "moveToBeginningOfLineAndModifySelection:";
/* end */
"\UF72B" = "moveToEndOfLine:";
"$\UF72B" = "moveToEndOfLineAndModifySelection:";
Paste this as PLAIN TEXT in an empty file in your favorite text editor (Smultron?) and save the file as
~/Library/KeyBindings/DefaultKeyBinding.dict
(NB: use Unix line endings)
(NB. You can do much more with keybindings
Logout and login again and you should have what you want.
This will work in most applications using the Cocoa text system.
But not in some: Safari in the address field and in the Google search box; you have to use Ctrl-A and Ctrl-E.
Berend

Similar Messages

  • How to remove end of line from string?

    Hello,
    I'd like to remove ends of line from the string. I've tried:
        static final Pattern END_LINE_PATTERN = Pattern.compile("$+");
        strBuf.append(input);
        Matcher m = END_LINE_PATTERN.matcher(input);
        int startIndex = -1;
        int endIndex;
        while (m.find()) {
         startIndex = m.start();
         endIndex = m.end();
         if (endIndex == strBuf.length() - 1) break;
        if (startIndex > -1) {
         strBuf.setLength(startIndex);
        }For strings "hello\n" and "hello\r" it works properly, but for string "hello\n\n" I get first occurrence at index 6 (at second \n), so as the result I get "hello\n". For the string "hello\r\n" I get first occurrence at index 5 (it's OK), but the end index is 5 as well, and the next occurrence I get at index 7, which doesn't give me any sense.
    Hope somebody can help me.
    Agata

    What you're trying to do is remove one or more line separators from the end of a string ("\n", "\r", and "\r\n" each count as one line separator, but "\n\n" is two line separators). This is all you need to do: str = str.replaceAll("[\r\n]+$", ""); "$" doesn't match any characters, line separators or otherwise; it matches the position at the end of the string. In MULTILINE mode, it also matches the position before a line separator, but it still doesn't match the separator itself.

  • How to Map one key to multiple values

    Hello Everyone
    Let's say I have a System. to access this system, one needs a username and a password. Now i have a Hashtable that maps passwords to their usernames. Now what if i want to store the Firstname and lastname of the person, in case he/she forgets the password or username? Is there a way to associate a key (Password) to multiple values(username, password, lastname)? if so, can you show me how to go about it?
    Edited by: Tonata on Apr 27, 2009 8:09 AM

    M.Murat wrote:
    Hello
    My suggestion is that you can create a map in which value is a list(for example Arraylist).
    You can store the items in that list and match that list to proper key.
    M.MuratCode smell: Object Denial+_                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to Maintain Surrogate Key Mapping (cross-reference) for Dimension Tables

    Hi,
    What would be the best approach on ODI to implement the Surrogate Key Mapping Table on the STG layer according to Kimball's technique:
    "Surrogate key mapping tables are designed to map natural keys from the disparate source systems to their master data warehouse surrogate key. Mapping tables are an efficient way to maintain surrogate keys in your data warehouse. These compact tables are designed for high-speed processing. Mapping tables contain only the most current value of a surrogate key— used to populate a dimension—and the natural key from the source system. Since the same dimension can have many sources, a mapping table contains a natural key column for each of its sources.
    Mapping tables can be equally effective if they are stored in a database or on the file system. The advantage of using a database for mapping tables is that you can utilize the database sequence generator to create new surrogate keys. And also, when indexed properly, mapping tables in a database are very efficient during key value lookups."
    We have a requirement to implement cross-reference mapping tables with Natural and Surrogate Keys for each dimension table. These mappings tables will be populated automatically (only inserts) during the E-LT execution, right after inserting into the dimension table.
    Someone have any idea on how to implement this on ODI?
    Thanks,
    Danilo

    Hi,
    first of all please avoid bolding something. After this according Kimball (if i remember well) is a 1:1 mapping, so no-surrogate key.
    After that personally you could use Lookup Table
    http://www.odigurus.com/2012/02/lookup-transformation-using-odi.html
    or make a simple outer join filtering by your "Active_Flag" column (remember that this filter need to be inside your outer join).
    Let us know
    Francesco

  • Email messages from my personal email account are being posted (copied) to SMS messages.  I have a new cell device, and this is happening on the new device also.  The copy/forward to SMS is NOT being initiated by my email provider.  How do I end this?

    Email messages from my personal email account are being posted (copied) to SMS messages.  I have a new cell device (swtched from Droid to iPhone) and this is happening on the new device also.  The copy/forward to SMS is NOT being initiated by my email provider, and not by Gmail.   How do I end ûVerizon's forwarding my personal email to SMS? 
    Thanks.

    Maybe I'm missing something but how can Verizon have control over your personal GMail account?  Sounds like you do have your email set up to forward to sms. 
    I have certain emails that are forwarded to me as SMS but that is an option that is enabled on the email side of things and is independent from Verizon.

  • I was syncing everything to itunes and I tried to do my contacts, not knowing quite how. I ended up erasing all of them from my phone without any of them syncing to my computer or itunes. Is there any way I can get them back? I really need them all.

    I was syncing everything to itunes and I tried to do my contacts, not knowing quite how. I ended up erasing all of them from my phone without any of them syncing to my computer or itunes. Is there any way I can get them back? I really need them all.

    There are lots of ideas floating on the web for this particular issue - all of which I tried. I had the same problem and it turned out to be my USB cable. I thought the cable was fine as it would charge my phone and play but the data transfer pin was bent. I replaced the cable and it fixed the problem. Worth a shot as it is an easy fix!

  • How can I find the words which spans across end of line to next line in pdf ?

    I am using Acrobat Adobe X Pro version for our form development and maintanence. I am writting a Acrobat JAVA batch script which reads through all the words and execute spell check and reports the mispelled words in a excel sheet. Since I am running this script in batch mode for more than 1000 pdfs - I am getting many words joined together. When I looked in to those pdfs all such words are looking okay because it is appearing in end of right margin and the next word is in the next line. Since there was no space between them it was extracted as a single word. Hence the failure.
    I used wordf = this.getPageNthWordQuads(i,j)  to get the word begin and end coordinates. when I closely observe the values are creating a rectangle and that doesnt span across lines. I got the coordinates for the regular word and the word which span acoross two lines. both of the coordinates are same.
    I think I am screwed - I have 8000 such words and no clue of how to get rid of them from the actual misspelled words.
    please help. let me know if any class /method if I call will give me the end of line or do I need to go to next layer to find this split.
    the addnot is somehow marking the words using this coordinates - please hellp me understand how this works. Thanks.
    // for all pages
    for (var i = 0; i < this.numPages; i++ )
    // For all the words
    pg += 1;
    numWords = this.getPageNumWords(i);
    for ( j = 0; j < numWords; j++)
    //get the spell check 
    ckWord = spell.checkWord(this.getPageNthWord(i,j))
    if ( ckWord != null )
    jn=0
    ml=0
    // if mispelled word found.
    wordf = this.getPageNthWordQuads(i,j)
    swordf = wordf.toString()
    var st = swordf.split(",")
    var diffx0 = parseInt(st[0])-8
    var diffx1 = parseInt(st[1])-8
    var diffx2 = parseInt(st[2])-8
    var diffx3 = parseInt(st[3])-8
    var diffx4 = parseInt(st[4])-8
    var diffx5 = parseInt(st[5])-8
    var diffx6 = parseInt(st[6])-8
    var diffx7 = parseInt(st[7])-8
    if (cWord == csword)
    jn = 1
    if ( st[1] != st[3] )
    ml = 1
    //dataLine += "\r\n write "
    else
    ml=2
    dataLine += "\r\n"+this.documentFileName
    + "\t" + this.getPageNthWord(i,j)
    + "\t" + pg
    + "\t" + j
    + "\t" + ml
    + "\t" + jn
    + "\t st[0] " + diffx0 + "\t st[1] " + diffx1 + "\t st[2] " + diffx2 + "\t st[3] " + diffx3 
    + "\t st[4] " + diffx4 + "\t st[5] " + diffx5 + "\t st[6] " + diffx6 + "\t st[7] " + diffx7 
    ck=1

    If Acrobat is reading each word part as separate words, you have a problem.
    The way I approached it in some of my tools was to check if a word ends
    with a hyphen, and if so, to check if it's the last on the line. If both
    conditions are true, combine with the next word on the next line. This is
    not fool proof, of course, as there are documents with columns are other
    structural elements that prevent this from working. Better than nothing,
    though...
    However, it is also possible that Acrobat does see both parts as parts of
    the same word. In that case, getPageNthWordQuads() will return multiple
    quads arrays. As you know, that method returns an array of quad arrays.
    There's usually only one, but in principle there could be more... Something
    to check before giving up.

  • XSLT Mapping :-- End to End Scenario

    Can any one provide XSLT Mapping End to End scenario with screen shots?

    HI
    XSLT Mapping
    XSLT stands for EXtensible Stylesheet Language Transformations. It is an XML based language for transforming XML documents into any other formats suitable for browser to display, on the basis of set of well-defined rules.
    Using XSLT mapping in a ccBPM scenario
    File to Multiple IDocs (XSLT Mapping)
    Steps required for developing XSLT Mapping
    u2022 Create a source data type and a target data type
    u2022 Create Message types for the source and target data types.
    u2022 Create Message Interfaces includes Inbound Message interface and Outbound Message interface.
    u2022 XSLT Mapping does not require creation of Message mapping, so donu2019t create any Message mapping.
    u2022 Create an .XSL file which converts source data type into target data type.
    u2022 Zip that .xsl file and import it into Integration Repository under Imported Archives.
    u2022 In Interface Mapping choose mapping program as XSL and specify this zip program. (Through search help you will get XSL Mapping programs that you imported under Imported Archives, select your corresponding XSL Program)
    u2022 Test this mapping program by navigating to Test tab.
    By having look at above steps you can easily find out that this mapping is no where different from other mapping programs, here the challenging lies in creating an XSLT file. If you spend couple of minutes in studying XPATH tutorial you would be in ideal position to create an XSL Transformation (.xsl extension).
    If you still find difficulties in generating XSL Transformation, then you can make use of a tool u201CAltova MapForceu201D which will create XSL file for you.
    Steps for creating XSL file using this tool:
    1. Open the Alto MapForce, import the source .xml and .xsd file in it
    2. Similarly import the target .xml and .xsd in MapForce.
    3. These two data files should match with source and target data types in Integration Repository.
    4. Complete the graphical mapping using extensive list of XSLT functions available there.
    5. Save the mapping file.
    6. Click the XSLT tab. You will have the entire xslt logic there.
    7. Copy that content and save it as .xsl file.
    8. Zip above .xsl file and import the same into IR under Imported Archives.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/01a57f0b-0501-0010-3ca9-d2ea3bb983c1
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9692eb84-0601-0010-5ca0-923b4fb8674a
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/006aa890-0201-0010-1eb1-afc5cbae3f15
    xpath functions in xslt mapping
    https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=xslt+mapping&adv=false&sortby=cm_rnd_rankvalue#
    complete mapping guide:
    http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/content.htm
    XSLT MAPPING:
    Generic XSLT Mapping for SAP XI,Part I
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/01a57f0b-0501-0010-3ca9-d2ea3bb983c1
    Generic XSLT Mapping for SAP XI,Part II
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9692eb84-0601-0010-5ca0-923b4fb8674a
    XSLT: Recursive Templates
    XSLT: Recursive Templates
    Easy RFC lookup from XSLT mappings using a Java helper class
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/05a3d62e-0a01-0010-14bc-adc8efd4ee14
    Step u2013 By u2013 Step Simple Approach for XSLT Mapping
    Step – By – Step Simple Approach for XSLT Mapping
    http://www.devguru.com/Technologies/xslt/quickref/xslt_element_applytemplates.html
    cheers
    Edited by: vemuganti naga phalguna on Jul 2, 2008 8:59 AM
    Edited by: vemuganti naga phalguna on Jul 2, 2008 9:07 AM

  • How can I end a download that won't complete?

    I tried to download Hangman. It actually loaded two copies and one will not complete even though I deleted the other. I now have a icon that has a completed bar but the program won't finish downloading
    How can I end it?

    Try this Discussion...
    https://discussions.apple.com/thread/4074945?tstart=0

  • How do you end a task that won't open

    How do you end a task that won't complete?

    Assuming that it doesn't show in Force Quit under the Apple menu - can you see it in Activity Monitor (/Applications/Utilities)

  • How can I end this annoying problem of YouTube not loading?

    Hello y'all!
    Relatively new to the Mac world here, so go easy on me!  How can I end once and for all, this problem with YouTube not loading in Safari and not being able to watch embeded videos?  I've read various "fixes" and have tried them all, and nothing seems to work.  Help!!  Thanks!

    We have no way of knowing exactly which "fixes" you are referring to...
    Try deleting Flash cookies.  http://machacks.tv/2009/01/27/flushapp-flash-cookie-removal-tool-for-os-x/
    Try uninstalling then reinstalling the Flash plugin. http://kb2.adobe.com/cps/865/cpsid_86551.html#ostype=m,prob1=fnctn,prob2=game,
    Your profile shows you are running v10.6.7. Of that is correct, update your software. Click your Apple menu (top left in your screen) then click Software Update...
    Repair Permissions using Disk Utility.    /Applications/Utilities

  • HT2204 how can I end an automatic renewal app

    How can I end an automatic renewal app from debiting my iTunes accounts. I no longer use the app, it's boring and takes too much time. it's about a month I haven't used it and I forgot I had it and now I can't find how to terminate this app? Today iTunes debited my account 3 month automatic renewal.

    iTunes Store: Purchasing and managing auto-renewing subscriptions

  • How do i end running apps in ios7

    how do i end running apps in ios7

    double click the home button and swipe the app window up and off of the screen

  • How do I end my free subscription to adobe creative cloud?

    How do I end my free subscription to adobe creative cloud? I didn't cancel the trail to remain subscribed. It is very disappointing that finding information on this topic seems to bee impossible.

    You do not have any CC registered to this ID, you are not being charged for CC. A free subscription is never, it gets disabled after 30 days.
    Regards
    Rajshree

  • HOW CAN YOU END A PROGRAM within the program??? (TERMINATING THE PROGRAM)

    I want my program to end if it encounters a certain string... i tried break.. but that doesn't do the job.. that just ends a loop... how can i end the program.. and maybe display a message such as "ERROR: Incorrect Input - Program will now terminate"...
    Thanks in adavnace

    thanks.. it works perfectly!

Maybe you are looking for

  • How to print a pure textfile to the printer?

    Hallo ! I want to send a pure textfile to a printer. How can I do this in java. Pleas give me a tip. Thank you Wolfgang

  • 16:9 video recording?

    Does the iPhone 3GS record widescreen? If so, how? I thought all you had to do was flip the camera to landscape but after doing so, the videos still show up 4:3 Thanks

  • Rookie needs help with program!!

    Hi everyone, I am new to JAVA programming and am trying to figure out my first progam. Any suggestions? Here's what I have to come up with... This program will test your ability to code a loop function and some work with the strings methods. INPUT A

  • How to set default channel colors

    channel colors can be changed after acquisition took place. How can I change the default used each time a new task is started? When entering the life data panel before acqiring there are no traces to change in the properties menu. Sincerely H.P. Bert

  • Printer server NETGEAR PS121 and Mac 10.5.8

    Trying to configure the PS121 on our Mac system (no PCs) and am having trouble trying to determine how I can assign the print server it's own IP. There are plenty of directions in this forum and on Netgear's forum that tell you how to add the printer