LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-17-2011, 05:03 PM   #1
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,657

Rep: Reputation: 255Reputation: 255Reputation: 255
keysym for xterm?


Hi,

I would like to convert this to xterm (not using urxvt). However there are keysyms. How could I pass the keysyms to xterm?

Code:
TERMINAL=xterm
GEOMETRY='-g 50x1+350+400'
FOREGROUND='--foreground green'
BACKGROUND='--background black'

if [[ $- != *i* ]] ; then
        urxvt $GEOMETRY $FOREGROUND $BACKGROUND \
        +sb -bc -b 6 -name "run" -title "run" \
        --keysym.C-0xFF0D: "\ ^A $TERMINAL -e \ ^E &\n exit\n" \
        --keysym.0xFF0D: "\ ^A parsecmd \ ^E &\n exit\n" \
        --keysym.0xFF1B: " &\ ^C exit\n" $@ \
        -e bash --init-file "$0"
Thanks
 
Old 08-21-2011, 07:50 PM   #2
dickey
Member
 
Registered: Jun 2009
Posts: 43

Rep: Reputation: 18
In xterm, that's usually done with the "translations" resource.
 
Old 08-28-2011, 10:32 AM   #3
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,657

Original Poster
Rep: Reputation: 255Reputation: 255Reputation: 255
Quote:
Originally Posted by dickey View Post
In xterm, that's usually done with the "translations" resource.
thansk
http://www.geocities.com/h2428/petar/bash_bind.htm

I think that I would use bind (bash) for it, it is simple, you can simply use eg.:

Code:
 bind "\C-?": backward-delete-char
However would you know how to detect this "\C-?" with something like xev but for the xterm?
and also to exec a command with bind ?



Quote:
$ bind --help
bash: bind: --: invalid option
bind: usage: bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-x keyseq:shell-command] [keyseq:readline-function or readline-command]



OK, got it with read:
<escape> is : ^[

Quote:
bind '"^[": exec skype'
is not working

Last edited by Xeratul; 08-28-2011 at 11:08 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Internal error could not resolve keysym *edited* HazMat117 Linux - Desktop 2 01-27-2011 10:01 PM
KeySym: Preventing repeat keys GotWookiee Programming 3 02-12-2008 12:13 PM
How to assign keysym? anitha.mit Linux - Newbie 4 12-20-2007 05:47 AM
Skippy is only giving me errors (keysym) and no help juyce Linux - Software 0 04-21-2006 11:38 PM
Keysym remapping - keyboard shortuts in a shell: how to define modifiers? larus_marinus Linux - General 0 07-03-2003 09:52 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration