maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   key bar for xterm (https://talk.maemo.org/showthread.php?t=34926)

qwerty12 2010-01-10 14:37

Re: key bar for xterm
 
Quote:

Originally Posted by les_garten (Post 462378)
Hi Qole,
Thanx for the help, strange that none of these work. Any other ideas?

You want Page_Up and Page_Down.

Disregard this, sorry. I was looking at your labels...

les_garten 2010-01-10 16:21

Re: key bar for xterm
 
Quote:

Originally Posted by qwerty12 (Post 462383)
You want Page_Up and Page_Down.

Disregard this, sorry. I was looking at your labels...

Every other key press works. Is it possible that the keypress keys access an empty history file?

Ehhh, on 2nd thought I don't think so. I can push the bar a few times off the key bar and it doesn't pull it back from the history when using PageUP on the key bar, but does pull it from the hx on the Keyboard.

b666m 2010-01-25 03:34

Re: key bar for xterm
 
any chance of maybe doing a own shortcut like:

shown name: "root"
command if you click it: "sudo gainroot"

or just any other command you may use regularly?! (:

les_garten 2010-01-25 05:51

Re: key bar for xterm
 
1 Attachment(s)
Quote:

Originally Posted by b666m (Post 492925)
any chance of maybe doing a own shortcut like:

shown name: "root"
command if you click it: "sudo gainroot"

or just any other command you may use regularly?! (:

I have one just like that

in /usr/share/applications/hildon the desktop files live.

Make a copy of the one called xterm.desktop or sometging like that. I think it's osso-xterm or something.

Edit the exec line to add the command "root" without the quotes. Set the icon command to your Icon you want. Here's one I made for root.

Put your icon in the scalable and 48x48 directories.

les_garten 2010-01-25 05:54

Re: key bar for xterm
 
Quote:

Originally Posted by les_garten (Post 462491)
Every other key press works. Is it possible that the keypress keys access an empty history file?

Ehhh, on 2nd thought I don't think so. I can push the bar a few times off the key bar and it doesn't pull it back from the history when using PageUP on the key bar, but does pull it from the hx on the Keyboard.

Does nobody use the PageUp and PageDn on the key bar? I REALLY wished this would work. It would save wear and tear on my keyboard slider just to hit the up arrow.

The up arrow and down arrow are what I want to pull commands from the command history.

b666m 2010-01-25 06:00

Re: key bar for xterm
 
mhm... a copy of the rx-51 file... cursors:

Code:

    key <UP>        { type[Group1] = "ONE_LEVEL", symbols[Group1] = [        Up        ] };
    key <LEFT>        { type[Group1] = "ONE_LEVEL", symbols[Group1] = [        Left        ] };
    key <DOWN>        { type[Group1] = "ONE_LEVEL", symbols[Group1] = [        Down        ] };
    key <RGHT>        { type[Group1] = "ONE_LEVEL", symbols[Group1] = [        Right        ] };


les_garten 2010-01-25 06:59

Re: key bar for xterm
 
Quote:

Originally Posted by b666m (Post 493045)
mhm... a copy of the rx-51 file... cursors:

Code:

    key <UP>        { type[Group1] = "ONE_LEVEL", symbols[Group1] = [        Up        ] };
    key <LEFT>        { type[Group1] = "ONE_LEVEL", symbols[Group1] = [        Left        ] };
    key <DOWN>        { type[Group1] = "ONE_LEVEL", symbols[Group1] = [        Down        ] };
    key <RGHT>        { type[Group1] = "ONE_LEVEL", symbols[Group1] = [        Right        ] };


Not sure how to integrate that into the gconf2 command?

qole 2010-01-25 19:58

Re: key bar for xterm
 
les_garten: There definitely seems to be a bug here. I was able to add Page_Up and Page_Down to the rx_51 keymap (fn+up and fn+down), but I was unable to make them work on the xterm bar.

les_garten 2010-01-25 20:14

Re: key bar for xterm
 
Quote:

Originally Posted by qole (Post 494227)
les_garten: There definitely seems to be a bug here. I was able to add Page_Up and Page_Down to the rx_51 keymap (fn+up and fn+down), but I was unable to make them work on the xterm bar.

I was beginning to think it was just me! But those were on there like that from the factory, ehhh? So they never worked for anyone?

blfgomes 2010-01-25 20:52

Re: key bar for xterm
 
Quote:

Originally Posted by les_garten (Post 493084)
Not sure how to integrate that into the gconf2 command?

I have Up and Down (along with Carriage Return) mapped so that I don't have to slide the keyboard out.

Modify the lines below according to your needs:
Code:

gconftool-2 --set -t list --list-type string \
    /apps/osso/xterm/key_labels "[Tab,Esc,Dn,Up,CR]"

gconftool-2 --set -t list --list-type string \
    /apps/osso/xterm/keys "[Tab,Escape,Down,Up,KP_Enter]"


TNiga 2010-01-25 20:55

Re: key bar for xterm
 
@les_garten: Page_Up and Page_Down works fine for me on the bar, always has. Have you tested them with some text editor or irssi, for example?

les_garten 2010-01-26 02:31

Re: key bar for xterm
 
Quote:

Originally Posted by blfgomes (Post 494307)
I have Up and Down (along with Carriage Return) mapped so that I don't have to slide the keyboard out.

Modify the lines below according to your needs:
Code:

gconftool-2 --set -t list --list-type string \
    /apps/osso/xterm/key_labels "[Tab,Esc,Dn,Up,CR]"

gconftool-2 --set -t list --list-type string \
    /apps/osso/xterm/keys "[Tab,Escape,Down,Up,KP_Enter]"


Bless you my Son!

qole 2010-01-26 05:14

Re: key bar for xterm
 
What, wait, "Dn" and "Up" are Page Down and Page Up?

les_garten 2010-01-26 05:56

Re: key bar for xterm
 
Quote:

Originally Posted by qole (Post 494947)
What, wait, "Dn" and "Up" are Page Down and Page Up?


Works perfect for me. I was looking for Up arrow and Down arrow and that's what I got! :D

qole 2010-01-26 06:09

Re: key bar for xterm
 
les_garten: You did NOT say you wanted up and down. You said you wanted PAGE up and PAGE down...

ludvig 2010-01-26 06:24

Re: key bar for xterm
 
Would it be possible to get cut and paste on to the bar?

This is functions that I use quite frequently so minimizing the amount of steps would be most helpful.

les_garten 2010-01-26 06:33

Re: key bar for xterm
 
Quote:

Originally Posted by qole (Post 494989)
les_garten: You did NOT say you wanted up and down. You said you wanted PAGE up and PAGE down...

Well on all my Keyboards that say Page Up or Page Down, the command hx is scrolled through.

blfgomes 2010-01-27 21:59

Re: key bar for xterm
 
Quote:

Originally Posted by qole (Post 494989)
les_garten: You did NOT say you wanted up and down. You said you wanted PAGE up and PAGE down...

He did say he wanted Page Up and Page Down, but he also said:

Quote:

Originally Posted by les_garten (Post 493039)
The up arrow and down arrow are what I want to pull commands from the command history.

:)

damion 2010-01-28 13:15

Re: key bar for xterm
 
Quote:

Originally Posted by ludvig (Post 494999)
Would it be possible to get cut and paste on to the bar?

This is functions that I use quite frequently so minimizing the amount of steps would be most helpful.

I would LOVE that, especially if I could have the bar only appear if I do something with the touch display, perhaps have it scroll or fade in. I don't want a WINCH signal generated and a change in tty state for the window.

At the moment, I've just got Ctrl to be sticky (will post about that elsewhere), and mapped Fn Up/Down to do PgUp/PgDn so with Ctrl-I for tab and ESC not being that necessary (^C works in vi/vim). I now sort of no longer need the bottom bar. I tended to hide away the top bar too and should be able to get a useful fullscreen. The problem is that c+p is useful, I also tend to like to get a new terminal from time to time, and maybe pull out the status menu to switch 2G/3G, volume, BT etc.

I'd just about got s2putty on the n97 working perfectly for my needs, with good gesture support to enhance the available keys (I mapped centre button of the directional pad on the left to sticky Ctrl), I got very used to swipe up as Tab in my email client for example.

I've now started to get in to the n900 but I've gone downhill as far as experience for a terminal is concerned.

jmk 2010-01-28 13:30

Re: key bar for xterm
 
Quote:

Originally Posted by nothing (Post 412188)
Could someone help me with how to add Alt key to keybar.

Help me also. I need sticky Alt button added to toolbar (like the control key).

EDIT: I managed to add Alt this way but how to make the Alt button sticky like the Ctrl?


Code:

gconftool-2 -s /apps/osso/xterm/key_labels -t list --list-type=string "[Tab,Esc,PgUp,PgDn,Alt]"

gconftool-2 -s /apps/osso/xterm/keys -t list --list-type=string "[Tab,Escape,Page_Up,Page_Down,Alt]"

Maybe keycode 56 = Alt_Lock or keycode 100 = SAlt works..

EDIT2: doesn't work like the sticky hardcoded? Ctrl

psmears 2010-03-11 21:17

Re: key bar for xterm
 
Quote:

Originally Posted by jmk (Post 499335)
Help me also. I need sticky Alt button added to toolbar (like the control key).

May I ask what you want the Alt key for? Usually if you press Alt+<letter> then xterm will send <escape> <letter> (i.e. an escape character followed by the letter) to the application. So having an Alt key on the menu bar wouldn't be much more useful than having the Esc key that's there by default. For example, in Emacs, to type M-x (for which you'd normally type Alt+x) you can press Escape then X.

Or did you need it for something else that this wouldn't work for?

Robb 2010-04-28 11:45

Re: key bar for xterm
 
I altered the keybar by adding a bar and greater symbol.
[Tab,Escape,bar,greater,Page_Up,Page_Down]
[Tab,Esc,|,>,PgUp,PgDn]

But then a strange situation - the marking arrow on right side of keybar has disappered!
Just to be sure, I reboot device, but still the same.

Only when I make fullscreen and then un-fullscreen does the arrow appear.

Anyone can confirm this problem? Or is it only me?

filed a bug: https://bugs.maemo.org/show_bug.cgi?id=10058

sswam 2010-06-07 15:26

Re: key bar for xterm
 
I made a few 2-letter scripts to control the xterm keys bar, at:
http://sam.nipl.net/code/n900-x/
fs - fullscreen - hides the keys bar
tb - toolbar - shows the keys bar
kd - Tab Esc PgUp PgDn - keys default
ks - Esc < > | ^ % ~ - keys shell (I use ctrl-i for tab)
kc - | { } [ ] < > - keys C (ctrl-c in vim acts like Esc)
kb - Esc [ ] < > | % - keys brace (or python)
kv - Tab < > | dn up cr - keys virtual - (for shell with virtual kbd)

sswam 2010-06-09 09:04

Re: key bar for xterm
 
Thanks for the thanks, and thanks to everyone else who's been working on this! A bit more about my keybar scripts, I made one for each of my major use cases: shell, C, python, virtual kbd. Where I need more symbols than would fit, I got rid of Tab, Esc, PgUp, PgDn, which are less important for me, and can largely be emulated with other key presses (ctrl-I, and ctrl-C, ctrl-U, ctrl-D in vim). I commonly use ctrl-I even on a normal kbd as it seems a bit less of a stretch than Tab. I don't remember that anyone else was removing those Tab, Esc, PgUp, PgDn key bar buttons, so this is a bit different. I was able to fit all the major extra symbols I need for C and shell programming onto the key bars, except % for C's printf. I'm happy enough to press "Sym" a pick that off the symbols popup! I guess I'm keen to get the keyboard working as well as possible because my laptop recently died so I've been coding a lot on the phone :)

sswam 2010-06-09 09:07

Re: key bar for xterm
 
Quote:

Originally Posted by hypnotik (Post 386549)
I'm sure Xterm can be recompiled with modified features... the joys of FOSS.

I'd really like to be able to re-compile xterm to make the button bar a bit thinner / more compact / fit more buttons on it. I had a look at the source and unfortunately it's not obvious to me how that can be achieved. Perhaps it's a theme issue, could we create a theme with narrower or more compressed toolbars? That might break a whole lot of other things though, or need smaller icons.

sswam 2010-06-09 09:14

Re: key bar for xterm
 
Quote:

Originally Posted by Petteri (Post 429112)
It would be neat to have new xterm package with configurable toolbar (keys and visibility toggle) in meamo extras repository. I am guessing that sending patches to Nokia will not lead to a new osso-xterm package in any sane time.

I think it would be cool to have one where you can switch between multiple toolbars for different activities. I do this with scripts at the moment, but it would be nice to have that on the menu. We need a key / gesture to restore the toolbars, as if they are gone you can't get to the menu to do so! or maybe a "hold touch" / right click menu like microb has?

sswam 2010-06-09 09:53

Re: key bar for xterm
 
I couple other things, I didn't put backtick ` on my shell keybar because we can use $(foo) in bash, and that's nestable too. Here's the code from my scripts:

Code:

# fs: fullscreen
gconftool-2 -s /apps/osso/xterm/toolbar -t bool "false" 

# tb: show toolbar
gconftool-2 -s /apps/osso/xterm/toolbar -t bool "true"

# kd: default keys:
gconftool-2 -s /apps/osso/xterm/key_labels -t list --list-type=string "[Tab,Esc,PgUp,PgDn]"
gconftool-2 -s /apps/osso/xterm/keys -t list --list-type=string "[Tab,Escape,Page_Up,Page_Down]"

# ks: shell keys
gconftool-2 -s /apps/osso/xterm/key_labels -t list --list-type=string "[Esc,<,>,|,^,%,~]"
gconftool-2 -s /apps/osso/xterm/keys -t list --list-type=string "[Escape,less,greater,bar,asciicircum,percent,asciitilde]"

# kc: C keys
gconftool-2 -s /apps/osso/xterm/key_labels -t list --list-type=string "[|,{,},\[,\],<,>]"
gconftool-2 -s /apps/osso/xterm/keys -t list --list-type=string "[bar,braceleft,braceright,bracketleft,bracketright,less,greater]"

# kb: brace / python keys
gconftool-2 -s /apps/osso/xterm/key_labels -t list --list-type=string "[Esc,\[,\],<,>,|,%]"
gconftool-2 -s /apps/osso/xterm/keys -t list --list-type=string "[Escape,bracketleft,bracketright,less,greater,bar,percent]"

# kv: key bar to help when using the virtual keyboard
gconftool-2 -s /apps/osso/xterm/key_labels -t list --list-type=string "[Tab,<,>,|,dn,up,cr]"
gconftool-2 -s /apps/osso/xterm/keys -t list --list-type=string "[Tab,less,greater,bar,Down,Up,KP_Enter]"

http://sam.nipl.net/code/n900-x/

Have fun! :)

-miniME- 2010-08-07 19:38

Re: key bar for xterm
 
hi

for the once facing the problem when beeing in real full screen (no top and bottom bar) here a short cut:

get yourselfs xbindkeys and wmctrl for n900 and create a file .xbindkeysrc in your home dir.

from .profile start xbindkeys and shortcut shift+enter toggles top bar on/off

---------.xbindkeysrc--------
"wmctrl -r :ACTIVE: -b toggle,fullscreen"
shift + KP_Enter
----------------------------------

ps: works for all applications - great for rss reader - anyway did not figure out a place to autstart it. i tried to start from system profile but it does not work. so for now i open xterm once and it works - here it calls xbindkeys via .profile file.


have fun

PathFinder@9GS 2010-08-24 01:22

Re: key bar for xterm
 
Quote:

Originally Posted by Robb (Post 631383)
I altered the keybar by adding a bar and greater symbol.
[Tab,Escape,bar,greater,Page_Up,Page_Down]
[Tab,Esc,|,>,PgUp,PgDn]

But then a strange situation - the marking arrow on right side of keybar has disappered!
Just to be sure, I reboot device, but still the same.

Only when I make fullscreen and then un-fullscreen does the arrow appear.

Anyone can confirm this problem? Or is it only me?

filed a bug: https://bugs.maemo.org/show_bug.cgi?id=10058

I'm having the same problem. Can anyone please help us with this??

Here is the code by kwotski which I used


Quote:

Originally Posted by kwotski (Post 408094)
Code:

~ $ gconftool-2 -s /apps/osso/xterm/keys -t list --list-type=string "[Tab,Escape,bar,greater,asciitilde,dead_grave,asciicircum]"
~ $ gconftool-2 -s /apps/osso/xterm/key_labels -t list --list-type=string "[Tab,Esc,|,>,~,\`,^]"



mail_e36 2010-10-01 20:23

Re: key bar for xterm
 
Friends,

Does anyone know how to add "Control C" to the bar?

C.Whiteham 2010-10-02 00:59

Why aren't you remapping your keys?
 
Quote:

Originally Posted by sswam (Post 706817)
I was able to fit all the major extra symbols I need for C and shell programming onto the key bars, except % for C's printf. I'm happy enough to press "Sym" a pick that off the symbols popup!

Do I understand you correctly? You are trying to fit more symbols onto the keybar on the screen (and not completely succeeding) because you do not want to have to press Meta-Symbol (by "Meta" I mean the Right-Up blue arrow) to call up the table of symbols so you can type things like % or ~ or <>[]{} or `^| etc.? Or am I missing something?

You probably already know that you can redefine your keyboard by modifying /usr/share/X11/xbd/symbols/nokia_vndr/rx-51 (you just have to go to root, and also make a backup in case anything is screwed up). It's a long config file, and the basic config starts around line 380 or 390 or something like that.

What you might not know is that you can map keys to the combination Shift+Meta+<key>. For example, the H key is mapped by default to these four characters:
h H ( (
That means: if you just press the key, it means "h"; with Shift it means "H"; with Fn it means "("; with Shift+Fn, it also means "(".

I've never figured out why Fn+<key> and Shift+Fn+<key> should map to the same thing, but that's the way it is for all of the keys ... until I changed it, of course.

So, you basically have almost 30 keys which you can combine with Shift+Meta to redefine as you like. For your % key, for example, I've redefined it to Shift+Fn+O.

The nice thing about using this remapped keyboard is that it's easy to press Shift+Fn with one finger, and then press the other key, so it's almost as easy as just hitting Shift or Meta alone --not to mention that you don't need to keep moving your fingers to the screen.

With this remapping, I actually got rid of the @ sign on the space bar and remapped it back to space bar (I find it ridiculous that I lock the Fn key to type numbers and then can't type a space). Same with : and . keys. I've put all eleven commonly used symbols `^%|~ []{}<> on the Shift+Fn key combos and still have room left over for other symbols.

Am I missing something? Is there a reason to avoid remapping Shift+Fn? I mean, it doesn't interfere with any other combos like the Shift+Ctrl keys.

rajil.s 2010-11-14 09:22

Re: key bar for xterm
 
1 Attachment(s)
For some reason the full screen icon is not moving to the extreme right. Is there any way i can make it do that?

I tried
Code:

gconftool-2 -s /apps/osso/xterm/keys -t list --list-type=string "[Tab,Escape,Page_Up,Page_Down,bar]"

alainlux 2010-11-21 20:30

Re: key bar for xterm
 
Quote:

Originally Posted by mail_e36 (Post 831190)
Friends,

Does anyone know how to add "Control C" to the bar?

Or Control-] for that matter (useful in telnet).

I have found how to bind key _sequences_:

gconftool-2 -s /apps/osso/xterm/keys -t list --list-type=string "[Tab,Escape,Page_Up,Page_Down,t e s t]"

Pressing that key will yield "test".

But how to get key _combinations_ ?

The obvious

gconftool-2 -s /apps/osso/xterm/keys -t list --list-type=string "[Tab,Escape,Page_Up, Page_Down,Control_L+bracketright]"


didn't work :-(

gregoranderson 2011-01-14 15:58

Re: key bar for xterm
 
1 Attachment(s)
Hi all,

Just came across this thread when looking for gconf options for the xterm. Exactly what I was looking for. I've used sswam's examples and stuck them all in one script, as well as adding a config of my own when using vi. It's dead easy to follow.

Everything is in the one file and you run it with a -i option to create the symlinks.

Example:

Copy the script to /usr/bin

Add your own confs.

Run the script with -i to create the symlinks:

Code:

Nokia-N900:~# setxterminalkeybar -i
Installing shortcuts for setxterminalkeybar :
tb ... added
kd ... added
ks ... added
kc ... added
kb ... added
kv ... exists
kvi ... added
Nokia-N900:~#

Then when I want to edit a file, I just run:

Code:

fs  # full screen
kvi # keyboard for vi
vi myfile # edit the file
tb # bring back the toolbar
kd # keyboard default


Cas07 2011-02-04 05:02

Re: key bar for xterm
 
Quote:

Originally Posted by gregoranderson (Post 920270)
Hi all,

Just came across this thread when looking for gconf options for the xterm. Exactly what I was looking for. I've used sswam's examples and stuck them all in one script, as well as adding a config of my own when using vi. It's dead easy to follow.

this is so handy. thanks to you and sswam!

kpykc 2011-02-27 11:21

Re: key bar for xterm
 
Quote:

Then when I want to edit a file, I just run:

Code:

fs  # full screen
kvi # keyboard for vi
vi myfile # edit the file
tb # bring back the toolbar
kd # keyboard default


Thanks for idea.
I think sometimes more usefull to have shortcuts for this things.
So, i propose to use readline/bash magic:
Code:

bind -x '"\C-fs"':'gconftool-2 -s /apps/osso/xterm/toolbar -t bool 0'
bind -x '"\C-tb"':'gconftool-2 -s /apps/osso/xterm/toolbar -t bool 1'
bind -x '"\C-xt"':'/usr/bin/osso-xterm'


[Knuckles] 2011-03-15 20:55

Re: key bar for xterm
 
Maybe it would be interesting for the CSSU to ship a better default (but don't change it for users that already customized) setting for this, that at least uses the unused space.

I just descovered this today and was one of those cases where "I did not know it existed, but now I can't live without it".

J4ZZ 2011-03-18 22:09

Re: key bar for xterm
 
Thanks for all these nice tips and for the hint to use gconf-editor from chinook....

I got it working on my device without issues.

So, if anybody wants it, go here

Greetz,

..::J4ZZ::..

leohart 2011-03-26 17:10

Re: key bar for xterm
 
help, after adding some special charactor, the original arrow on the most left disappears...sometimes it will apear, but most time it disappears
how can I fix this?

ps: I think there is an app in the repository to do key bar editting for me, but I can't find it now, anyone knows the name?

guylhem 2011-10-02 21:02

Re: key bar for xterm
 
If anyone is interested, my lines :

gconftool-2 -s /apps/osso/xterm/key_labels -t list --list-type=string "[Tab,Esc,\`,|,>,~,^,%]"
gconftool-2 -s /apps/osso/xterm/keys -t list --list-type=string "[Tab,Escape,grave,bar,greater,asciitilde,asciicircu m,percent]"
gconftool-2 -s /apps/osso/xterm/reverse -t bool true
gconftool-2 -s /apps/osso/xterm/font_size -t int 16

I thus have ` | > ~ ^ % in a reverse colored terminal (white on black) with a 16pt font. I wish I could make it bigger but CTRL is eating a lot of space on the keybar.

Anyone knows how to remove it?

Guylhem


All times are GMT. The time now is 02:17.

vBulletin® Version 3.8.8