updated moude_bindings.tcl with Paul`s new version, updated noconn.sym (do not use *_ignore attributes, put comments in netlist about NC net)
This commit is contained in:
parent
6755975369
commit
f8f7c4f230
|
|
@ -1,55 +1,116 @@
|
|||
################################################################################
|
||||
# $Id: mouse_bindings.tcl,v 1.3 2023/06/26 21:00:11 paul Exp $
|
||||
# $Id: mouse_bindings.tcl,v 1.6 2023/06/29 23:44:15 paul Exp $
|
||||
#
|
||||
# $env(HOME)/.xschem/mouse_bindings.tcl
|
||||
# $env(HOME)/.xschem/mouse_bindings.tcl
|
||||
#
|
||||
# The purpose of this code is to configure custom mouse button bindings for
|
||||
# mice that have more buttons than the conventional 3 buttons and scroll wheel.
|
||||
# This code also works to reconfigure bindings for conventional mice.
|
||||
# This code also works to reconfigure bindings for conventional mice. In my
|
||||
# case, my mouse has 2 extra buttons that X11 has identified as 8 & 9.
|
||||
#
|
||||
# INSTRUCTIONS:
|
||||
# 1. use linux command 'xev -event button' to find the X11 mouse button ID
|
||||
# number for any mouse button.
|
||||
# 2. modify 'proc mouse_buttons' below to define an action for the button
|
||||
# along with optional key modifier(s).
|
||||
# 3. add the following line to user xschemrc file:
|
||||
# lappend tcl_files $env(HOME)/.xschem/mouse_bindings.tcl
|
||||
# 1. use linux command 'xev -event button' to find the X11 mouse button ID
|
||||
# number for any mouse button.
|
||||
# 2. modify 'proc mouse_buttons' below to define an action for the button
|
||||
# along with optional key modifier(s).
|
||||
# 3. add the following line to user xschemrc file:
|
||||
# lappend tcl_files $env(HOME)/.xschem/mouse_bindings.tcl
|
||||
#
|
||||
################################################################################
|
||||
|
||||
################################################################################
|
||||
# PARAMETERS of proc mouse_buttons { b m }:
|
||||
# NOTE THAT BIT 4 OF $m IS ALWAYS SET SO $m >= 16
|
||||
# NOTE BITS 1,4,5 (Cap-Lock,Num-Lock,Undefined) Need to be cleared
|
||||
# NOTE THAT THE 'OR' OF ALL MODIFIER KEYS = 0x4f
|
||||
# $m: modifier key(s)
|
||||
# No Modifier: 0
|
||||
# Shift: 1
|
||||
# Caps-Lock: 2
|
||||
# Control: 4
|
||||
# Alt: 8
|
||||
# Num-Lock: 16
|
||||
# Win key: 64
|
||||
# To encode multiple modifiers simply add the corresponding modifier numbers
|
||||
# $m: modifier: bit# bitval
|
||||
# No Modifier: - 0
|
||||
# Shift: 0 1
|
||||
# Cap-Lock: 1 2
|
||||
# Control: 2 4
|
||||
# Alt: 3 8
|
||||
# Num-Lock: 4 16
|
||||
# Mod3: 5 32 (not mapped to any key on PC keyboards)
|
||||
# Win key: 6 64
|
||||
# To encode multiple modifiers simply add the corresponding modifier bitvals
|
||||
# $b: mouse button: 1..9
|
||||
################################################################################
|
||||
|
||||
proc mouse_buttons { b m } {
|
||||
# filter out Caps-Lock and Num-Lock status
|
||||
set m [ expr { $m & ~(16+2) } ]
|
||||
# puts "modifier state: $m"
|
||||
switch $m {
|
||||
0 { switch $b {
|
||||
8 { xschem zoom_full center }
|
||||
9 { xschem unhilight_all } } }
|
||||
1 { switch $b {
|
||||
8 { xschem set_modify 1; xschem save } } }
|
||||
}
|
||||
# filter out Cap-Lock, Num-Lock, and Undefined keys
|
||||
set m [ expr { $m & ~(2+16+32) } ]
|
||||
# puts "modifier state: $m"
|
||||
switch $m {
|
||||
# None
|
||||
0 { switch $b {
|
||||
8 { xschem zoom_full center }
|
||||
9 { xschem unhilight_all } } }
|
||||
# Shift
|
||||
1 { switch $b {
|
||||
8 { xschem set_modify 1; xschem save }
|
||||
9 { } } }
|
||||
# Cntl
|
||||
4 { switch $b {
|
||||
8 { }
|
||||
9 { } } }
|
||||
# Shift+Cntl
|
||||
5 { switch $b {
|
||||
8 { }
|
||||
9 { } } }
|
||||
# Alt
|
||||
8 { switch $b {
|
||||
8 { }
|
||||
9 { } } }
|
||||
# Shift+Alt
|
||||
9 { switch $b {
|
||||
8 { }
|
||||
9 { } } }
|
||||
# Cntl+Alt
|
||||
12 { switch $b {
|
||||
8 { }
|
||||
9 { } } }
|
||||
# Shift+Cntl+Alt
|
||||
13 { switch $b {
|
||||
8 { }
|
||||
9 { } } }
|
||||
# Winkey
|
||||
64 { switch $b {
|
||||
8 { }
|
||||
9 { } } }
|
||||
# Shift+Winkey
|
||||
65 { switch $b {
|
||||
8 { }
|
||||
9 { } } }
|
||||
# Cntl+Winkey
|
||||
68 { switch $b {
|
||||
8 { }
|
||||
9 { } } }
|
||||
# Shift+Cntl+Winkey
|
||||
69 { switch $b {
|
||||
8 { }
|
||||
9 { } } }
|
||||
# Alt+Winkey
|
||||
72 { switch $b {
|
||||
8 { }
|
||||
9 { } } }
|
||||
# Shift+Alt+Winkey
|
||||
73 { switch $b {
|
||||
8 { }
|
||||
9 { } } }
|
||||
# Cntl+Alt+Winkey
|
||||
76 { switch $b {
|
||||
8 { }
|
||||
9 { } } }
|
||||
# Shift+Cntl+Alt+Winkey
|
||||
77 { switch $b {
|
||||
8 { }
|
||||
9 { } } }
|
||||
}
|
||||
}
|
||||
|
||||
# the global variable 'has_x' is provided by xschem. It is defined to '1'
|
||||
# if graphics has been initialized.
|
||||
|
||||
if { [ info exists has_x ] } {
|
||||
# puts "Loading ~/.xschem/mouse_bindings.tcl"
|
||||
bind .drw <Any-Button> {+mouse_buttons %b %s}
|
||||
# puts "Loading ~/.xschem/mouse_bindings.tcl"
|
||||
bind .drw <Any-Button> {+mouse_buttons %b %s}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
v {xschem version=2.9.8 file_version=1.2}
|
||||
v {xschem version=3.4.1 file_version=1.2
|
||||
}
|
||||
G {}
|
||||
K {type=noconn
|
||||
format="* noconn "
|
||||
vhdl_ignore=true
|
||||
verilog_ignore=true
|
||||
spice_ignore=true
|
||||
format="* noconn @#0:net_name"
|
||||
vhdl_format="-- noconn @#0:net_name"
|
||||
verilog_format="// noconn @#0:net_name"
|
||||
tedax_format="# noconn @#0:net_name"
|
||||
template="name=l1"}
|
||||
V {}
|
||||
S {}
|
||||
|
|
|
|||
Loading…
Reference in New Issue