← Back to team overview

ubuntu-phone team mailing list archive

Re: Terminal Reboot in Click store

 

Hi

On Mon 08-Dec-2014 at 02:26:15PM +0100, Filippo Scognamiglio wrote:
> 
> The layouts are included in "/src/app/qml/KeyboardRows/Layout". 

I don't have a /src/ directory.

> It's probably easier to grab one of the default and copy/customize it
> for your needs. 

Sounds good.

> To add them to the selector you should edit
> src/app/qml/KeyboardBar.qml and add it to the list of actions (this
> last part needs to be abstracted). If you need more details just let
> me know.

I can find two copies of this file (or is one a symlink to the other?):

  find ./ -name KeyboardBar.qml
  ./opt/click.ubuntu.com/com.ubuntu.developer.flscogna.terminalreboot/0.8.027/qml/KeyboardBar.qml
  ./userdata/system-data/opt/click.ubuntu.com/com.ubuntu.developer.flscogna.terminalreboot/0.8.027/qml/KeyboardBar.qml

I tried editing
./opt/click.ubuntu.com/com.ubuntu.developer.flscogna.terminalreboot/0.8.027/qml/KeyboardRows/Layouts/ControlKeysLayout.qml
and changed the default Ctrl+ options, restarted the app and now there
is a blank menu in the terminal under Crtl. I don't think I made any
syntax mistakes, but perhaps I did:

import QtQuick 2.0
import Ubuntu.Components 1.1

import ".."

KeyboardRow {
    keyWidth: units.gu(10)
    model: [
        KeyModel {
            text: "CTRL+D"
            mainAction: Action { onTriggered: simulateKey(Qt.Key_D, Qt.ControlModifier);}
        },
        KeyModel {
            text: "CTRL+A"
            mainAction: Action { onTriggered: simulateKey(Qt.Key_A, Qt.ControlModifier);}
        },
        KeyModel {
            text: "CTRL+C"
            mainAction: Action { onTriggered: simulateKey(Qt.Key_C, Qt.ControlModifier);}
        },
        KeyModel {
            text: "CTRL+X"
            mainAction: Action { onTriggered: simulateKey(Qt.Key_X, Qt.ControlModifier);}
        }
        KeyModel {
            text: "CTRL+N"
            mainAction: Action { onTriggered: simulateKey(Qt.Key_N, Qt.ControlModifier);}
        }
        KeyModel {
            text: "CTRL+P"
            mainAction: Action { onTriggered: simulateKey(Qt.Key_P, Qt.ControlModifier);}
        }
    ]
}

> I miss the gesture based arrow keys -- what was the thinking behind
> > removing that feature?
> 
> In reality the feature has never been removed, we haven't really thought
> about it yet. The only gestures currently implemented are swipe up/down and
> dual finger swipe up/down for widget and history scrolling (we are thinking
> about swapping them), I'm open to suggestions for all the others.

I like the double tap for tab completion. 

All the best

Chris

-- 
Webarchitects Co-operative
http://webarchitects.coop/
+44 114 276 9709
@webarchcoop


Follow ups

References