             # 1.2 caret is in the middle of the line : delete one caracter
             else
                 # console.log '_backspace 5 - deletion of one caracter - test ok'
-                # we consider that we are in a text node
+                # we consider that we are in a text node (selection has been 
+                # normalized)
                 textNode = sel.range.startContainer
                 startOffset = sel.range.startOffset
                 txt = textNode.textContent

                            'CtrlShift-right', 'CtrlShift-left']
            @newPosition = true
        
        # 4- the current selection is cleared everytime keypress occurs.
        # @currentSel = null
                 
        # 5- launch the action corresponding to the pressed shortcut
        switch shortcut

                endLine.setType('T' + endLineType[1])
            @markerList endLine

 
    ###*
     * Put caret at given position. The break point will be normalized (ie put 
     * in the closest text node).
     * @param {element} startContainer Container of the break point
     * @param {number} startOffset    Offset of the break point
     * @param  {boolean} preferNext [optional] if true, in case BP8, we will choose
     *                              to go in next sibling - if it exists - rather 
     *                              than in the previous one.
     * @return {Object} {cont,offset} the normalized break point
    ###
    _setCaret : (startContainer, startOffset, preferNext) ->
        bp = selection.normalizeBP(startContainer, startOffset, preferNext)
        range = rangy.createRange()
        range.collapseToPoint bp.cont, bp.offset
        @currentSel.sel.setSingleRange range
        return bp
    
    _setCaretAfter : (elemt) ->
        nextEl = elemt
        while nextEl.nextSibling == null
            nextEl = nextEl.parentElement
        nextEl = nextEl.nextSibling
        if nextEl.nodeName == 'BR'
            index = 0
            parent = elemt.parentNode
            while parent.childNodes[index] != elemt
                index += 1
            @_setCaret(parent,index + 1)
        else
            @_setCaret(nextEl,0)



    ### ------------------------------------------------------------------------
    #  _insertLineAfter
