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)

dnastase 2009-11-23 02:00

key bar for xterm
 
It looks like the only setting possible now in xterm is changing the font ?!

How about:
- adding more keys to the bar
- hide the bar (eg: when using a bluetooth keyboard)

Those were useful things...

hypnotik 2009-11-23 02:05

Re: key bar for xterm
 
Quote:

Originally Posted by dnastase (Post 386536)
It looks like the only setting possible now in xterm is changing the font ?!

How about:
- adding more keys to the bar
- hide the bar (eg: when using a bluetooth keyboard)

Those were useful things...

I'm sure Xterm can be recompiled with modified features... the joys of FOSS.

dnastase 2009-11-23 02:10

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.

That's exactly what I was afraid of: having to do it myself... :eek:

qole 2009-11-23 02:55

Re: key bar for xterm
 
Can someone at least point us to the config file for that bar, so we can put our own custom keys on there?

hypnotik 2009-11-23 03:26

Re: key bar for xterm
 
Maybe this will help?

http://forums.internettablettalk.com...11&postcount=5

qole 2009-11-23 05:10

Re: key bar for xterm
 
No, that's for the keymap. I want the terminal key bar.

iKneaDough 2009-11-23 05:53

Re: key bar for xterm
 
Quote:

Originally Posted by qole (Post 386583)
Can someone at least point us to the config file for that bar, so we can put our own custom keys on there?

I'm not sure about Fremantle, but in Diablo it's settings are stored in gconf under :
Code:

/apps/osso/xterm
There are 2 string lists there:
Code:

key_labels
and
Code:

keys
Where each entry in 'key_labels' corresponds to it's entry in 'keys'.

Fore example; I have an entry in 'key_labels':
Code:

|
whose corresponding entry in 'keys' is:
Code:

bar
which gives me the pipe symbol.

I hope this information is useful to you in Fremantle as well.

lma 2009-11-23 07:17

Re: key bar for xterm
 
The following works to add the "|" button on the Fremantle osso-xterm bar:

Code:

~ $ 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,bar]"

I should probably also mention the open bug for this, you know what to do ;-)

joppu 2009-11-23 08:18

Re: key bar for xterm
 
The key bar probably needs up/down keys too since the arrow keys a crippled of Scandinavian/some European keyboard models.

qole 2009-11-23 20:55

Re: key bar for xterm
 
Thanks iKneaDough! I used the Chinook gconf-editor and set up my Fremantle osso-xterm the way I liked it.

Just a note, the ~ key, which is a pain to get to on the N900 (Fn-Ctrl, screen tap on ~ key, space) is "asciitilde" in "keys".

qole 2009-11-24 00:42

Re: key bar for xterm
 
Ok, here is my final key bar layout. I think (many of) you'll agree that these are very useful keys to have on the key bar for the N900.

http://farm3.static.flickr.com/2493/...c2d5e637_o.png

And just to collect the codes in one place:

CR = KP_Enter (for hitting enter when the keyboard isn't out)
| = bar
~ = asciitilde
> = greater
` = grave dead_grave (that's my creepy favorite! Note: needs to be hit twice for backquote)

arkanoid 2009-12-02 23:23

Re: key bar for xterm
 
what about f1-f12?

kwotski 2009-12-03 03:14

Re: key bar for xterm
 
Quote:

Originally Posted by lma (Post 386724)
The following works to add the "|" button on the Fremantle osso-xterm bar:

Code:

~ $ 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,bar]"

I should probably also mention the open bug for this, you know what to do ;-)

Edit!
Quote:

Originally Posted by kwotski (I am an idiot sometimes)
I've tried these commands, but to no effect..

Here is the output from the corresponding gconftool-2 gets:

Code:

~ $ gconftool-2 -g /appa/osso/xterm/key_labels
[Tab,Esc,PgUp,PgDn,|]
~ $ gconftool-2 -g /appa/osso/xterm/keys
[Tab,Escape,Page_Up,Page_Down,Bar]

After exiting the terminal and starting up a new one, there's no change visible in the key bar. Did I miss something?

Yes, you idiot, it's /apps not /appa ffs! Works now. Thanks.

Also, since you people seem to know what you're talking about... what the heck is that NW-facing arrow at the bottom left of the XTerm about? Doesn't seem to do anything here.. Edit: Ok, nevermind that, I see it enables text selection now

jjx 2009-12-03 18:04

Re: key bar for xterm
 
I agree the extra keys are very useful.

With so few lines in landscape mode, it would be helpful to put the key bar to one side or the other, instead of underneath. Or indeed, a whole sidebar of running apps/widgets - that would be great for those intensive text-editing Mutt using sessions :)

kwotski 2009-12-03 18:28

Re: key bar for xterm
 
1 Attachment(s)
Ok, now it's daytime and my eyes are working better, I've spotted the subtle error in my post above and got this working.

I decided on ^ (circumflex) rather than <enter> but otherwise the same choices as qole's, but done with the commandline as above:

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,|,>,~,\`,^]"

giving:

qole 2009-12-03 18:44

Re: key bar for xterm
 
kwotski: what do you use the ^ hat for?

kwotski 2009-12-03 23:04

Re: key bar for xterm
 
Quote:

Originally Posted by qole (Post 408128)
kwotski: what do you use the ^ hat for?

It has some use in regular expressions (beginning of a string, or "not" inside a character class), also in shell expansion (related to the regexp use) for example 'ls *[^z]' : list all files with name at least one character long, not ending in 'z'. Of course, you need the [ and ] mapped for that to be really useful! ;)

BTW, I discovered that if you drop the dead_ from dead_grave and just put grave, you don't have to press it twice!

insyte 2009-12-04 15:56

Re: key bar for xterm
 
How can I find a list of the available key names? Gconf is new to me...

psmears 2009-12-04 17:02

Re: key bar for xterm
 
Quote:

Originally Posted by qole (Post 408128)
kwotski: what do you use the ^ hat for?

Another use for the ^ character (at least it most shells e.g. tcsh/bash) is for quick corrections of typos. For example, if you accidentally type:

Code:

less thisisaveryloNGfilename.txt
then, rather than either re-typing the whole line, or using the arrow keys lots of times to get to the right place, you can change the "NG" to "ng" by typing just:

Code:

^NG^ng

gwax 2009-12-04 22:37

Re: key bar for xterm
 
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,|,>,~,\`,^]"


dead_grave refers to the dead key for the grave accent (aka, backtick).

If you instead use:

Code:

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

"dead_grave" > "grave"

you will only have to press ` once to get a ` symbol.

nothing 2009-12-05 22:48

Re: key bar for xterm
 
Could someone help me with how to add Alt key to keybar.

filologen 2009-12-06 08:40

Re: key bar for xterm
 
Quote:

Originally Posted by insyte (Post 410109)
How can I find a list of the available key names? Gconf is new to me...

I would also be very interested in this, since I would like to add some (Old) Icelandic characters (yeah, I know, pretty exotic stuff;) ), namely

þ (&thorn; )
Þ (&THORN; )
ð (&eth; )
ǫ (&oogon; )

Anyone with an idea about how to do this?

filologen 2009-12-06 13:53

Re: key bar for xterm
 
Never mind, I just remapped some keys on the hardware keyboard. This is a better solution for the Icelandic characters since I am then able to use them also outside xterm (just haven't figured out how to put ǫ (&oogon; ) on the keyboard since I am not sure what its name is in this context.

EDIT: I managed to get &oogon; working by adding dead_ogonek to the keyboard layout.

tomchiverton 2009-12-13 16:02

Re: key bar for xterm
 
What are the default values for keys/key_list ?
Where is the list of possible values to go in the list (or how to figure them out) ?

I ask because I like the item that toggles select mode on/off and the only way to get it back at the mo. is to toggle full screen on and then back off again...

dafrabbit 2009-12-13 19:57

Re: key bar for xterm
 
When I try and map these keys in the toolbar, it works properly but the "fullscreen" button gets shifted over to the left of all the new buttons. Any way to move it back to the end of the list (as qole and kwotski have in their screenshots)? Using the same commands as they are, as far as I can tell.

delaroca 2009-12-15 08:52

Re: key bar for xterm
 
Quote:

Originally Posted by jjx (Post 408062)
I agree the extra keys are very useful.

With so few lines in landscape mode, it would be helpful to put the key bar to one side or the other, instead of underneath. Or indeed, a whole sidebar of running apps/widgets - that would be great for those intensive text-editing Mutt using sessions :)

The toolbar appears to allow for defining up to 7 keys -- besides the mandatory default Ctrl key. If you define more than 7 keys, then 6 keys are displayed followed by a downward arrow symbol... when touched (clicked) it opens a side-menu with the additional keys you defined. But watch out, the "switch to full-screen icon disappears... it is actually the last entry in the side-menu -- BUT IT IS BLANK... but clicking on that blank space actually switches you to / from full-screen.

In an ancient version of Osso Xterm you could program multi-chat sequences. Here, I succeeded in programing keys such as "<ctrl>c" and even "<ctrl>backslash"... but apparently I couldn't program a sequence like "<ctrl>cy" to send a 'Ctrl-c' char followed by 'y'.

--denis

fate 2009-12-15 15:13

Re: key bar for xterm
 
Quote:

Originally Posted by dnastase (Post 386536)
- hide the bar (eg: when using a bluetooth keyboard)

Because I don't see it listed here yet, I found the following worked for me:

Code:

gconftool-2 -s /apps/osso/xterm/toolbar -t bool "false"
Now, when I press the button to hide the top bar, the toolbar is also hidden, giving me a properly fullscreen terminal.

Ctrl-backspace still brings up the Expose view for app-switching.

I don't yet know a key combination to restore the top and bottom bars - so if anyone can help me out, that would be useful - doing it by script seems a bit extreme (although they come up by default on a new terminal, which seems sensible).

(Oh, and I already remapped the pgup, pgdn, etc keys to various hardware keys - the solutions for that linked elsewhere worked for me).

Petteri 2009-12-15 15:44

Re: key bar for xterm
 
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.

jsuggs 2009-12-15 15:50

Re: key bar for xterm
 
Not trying to hijack, but what is the best way to enter the pipe | symbol? It would be a great one to add to the toolbar.

dafrabbit 2009-12-15 15:52

Re: key bar for xterm
 
You can enter the | symbol via either the virtual keyboard or by holding the arrow+SYM key on the hardware keyboard and selecting the | character from the menu that pops up.

fate 2009-12-15 15:57

Re: key bar for xterm
 
If you wanted to add it to the bar, the key name is 'bar', and several posts above tell you how to use gconftool-2 to put that on the toolbar.

If you want to map it to the hardware keys (in place of, say, the euro symbol), the keyboard remapping thread should be able to help you out there.

jebba 2009-12-23 22:49

Re: key bar for xterm
 
How about [, ], {, } ?

Also, a couple people have asked, but I haven't seen an answer. Where is a full list of the possible characters?

Thanks,

-Jeff

jebba 2009-12-23 22:52

Re: key bar for xterm
 
Quote:

Originally Posted by jebba (Post 439654)
Where is a full list of the possible characters?

Ah, answering my own question, the keymap to look up symbol names is here:

/usr/share/X11/xkb/symbols/nokia_vndr/rx-51

jebba 2009-12-23 23:03

Re: key bar for xterm
 
Here's my (lamish) script. Good if you need Spanish ó é ñ, etc and unix :)

Code:

#!/bin/sh

KEYS=`gconftool-2 --get \
        /apps/osso/xterm/keys`

KEY_LABELS=`gconftool-2 --get \
        /apps/osso/xterm/key_labels`

echo "Current settings:"
echo "KEYS $KEYS"
echo "KEY_LABELS $KEY_LABELS"

# Default
NEW_KEYS="[Tab,Escape,Page_Up,Page_Down]"
NEW_KEY_LABELS="[Tab,Esc,PgUp,PgDn]"

# Custom
# see here for a possible list:
# /usr/share/X11/xkb/symbols/nokia_vndr/rx-51
NEW_KEYS="[Tab,Escape,bar,dead_tilde,greater,dead_acute,grave]"
NEW_KEY_LABELS="[Tab,Esc,|,~,>,´,\`]"

echo "New settings:"
echo "KEYS $NEW_KEYS"
echo "KEY_LABELS $NEW_KEY_LABELS"

gconftool-2 --set -t list  --list-type string \
        /apps/osso/xterm/keys \
        $NEW_KEYS

gconftool-2 --set -t list  --list-type string \
        /apps/osso/xterm/key_labels \
        $NEW_KEY_LABELS


-Jeff
http://wiki.maemo.org/User:Jebba

jebba 2009-12-23 23:24

Re: key bar for xterm
 
A bit off topic, but to make the screen black & green:

Code:

#!/bin/sh

gconftool-2 --set --type bool \
        /apps/osso/xterm/reverse \
        false

gconftool-2 --set --type string \
        /apps/osso/xterm/background \
        "#000000"

gconftool-2 --set --type string \
        /apps/osso/xterm/foreground \
        "#00FF00"

To turn on & off the toolbar:

Code:

#!/bin/sh

SETTING=`gconftool-2 --get \
        /apps/osso/xterm/toolbar`

if [ $SETTING == "true" ]
        then NEWSETTING="false"
        else NEWSETTING="true"
fi

gconftool-2 --set --type bool \
        /apps/osso/xterm/toolbar \
        $NEWSETTING


kwotski 2009-12-23 23:37

Re: key bar for xterm
 
Quote:

Originally Posted by jebba (Post 439659)
Ah, answering my own question, the keymap to look up symbol names is here:

/usr/share/X11/xkb/symbols/nokia_vndr/rx-51

Though there are some names that work, but aren't in there. e.g. asciicircum (which is a non-dead ^).

Of course you can edit that file and then load it up with setxkbmap as has been mentioned.

Some other bits, and a sample alternate rx-51 file are in http://talk.maemo.org/showthread.php...864#post410864 and thereabouts.

I guess the set of available codes might have something to do with the files /usr/share/X11/locale/<your charset>/Compose ?

les_garten 2010-01-03 14:38

Re: key bar for xterm
 
My PgUp and PgDn don't work on the bar. Any idea why?

Code:

gconftool-2 -s /apps/osso/xterm/key_labels -t list --list-type=string "[Tab,Esc,PgUp,PgDn,|,CR,~,>,']"

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


les_garten 2010-01-09 18:59

Re: key bar for xterm
 
Bump to see if I can get an answer to my question above.

My Page up and Page down don't work on my Key Bar, any ideas why? All the other keys work.

Thanx!

qole 2010-01-10 09:13

Re: key bar for xterm
 
les_garten:

I googled "keysyms list" and got this hit. It suggests that you should be using Prior and Next (or PageUp and PageDown).

EDIT: This page suggests KP_Prior and KP_Next might work if plain Prior and Next don't.

les_garten 2010-01-10 14:34

Re: key bar for xterm
 
Quote:

Originally Posted by qole (Post 462113)
les_garten:

I googled "keysyms list" and got this hit. It suggests that you should be using Prior and Next (or PageUp and PageDown).

EDIT: This page suggests KP_Prior and KP_Next might work if plain Prior and Next don't.

Hi Qole,
Thanx for the help, strange that none of these work. Any other ideas?


All times are GMT. The time now is 21:29.

vBulletin® Version 3.8.8