curses-extension 1.1.3 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/curses-template.rb +13 -6
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20ace1645f195ea2d92bbf0cb9b84955194bfc10d1eaee5f9d535a0dd8c18668
|
4
|
+
data.tar.gz: 9b2b5cc6e581753260fd16c9a474f0bdf19fc108a050d1e64671212009eb42f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49d8d315491a99d4c3cb343d10d2d0c8f1bdce3d988458e9fdea17a38b213822accc77e49ac5f517c329a987131e13fc8cb761d12f64259f7bed05e683a7dd6a
|
7
|
+
data.tar.gz: 2a1de1c02140013d55fd8ae130ab55267ba80a5ba3374727aac41ad1d9652031a1a853127a5d67fdea1799287237457b55217cac3891df3861747e67fe2d4aed
|
data/lib/curses-template.rb
CHANGED
@@ -131,12 +131,19 @@ def getchr # PROCESS KEY PRESSES
|
|
131
131
|
when 'C' then chr = "RIGHT"
|
132
132
|
when 'D' then chr = "LEFT"
|
133
133
|
when 'Z' then chr = "S-TAB"
|
134
|
-
when '2' then chr = "INS" ; STDIN.getc
|
135
|
-
when '3' then chr = "DEL" ; STDIN.getc
|
136
|
-
when '5' then chr = "PgUP" ; STDIN.getc
|
137
|
-
when '6' then chr = "PgDOWN" ; STDIN.getc
|
138
|
-
when '7' then chr = "HOME" ; STDIN.getc
|
139
|
-
when '8' then chr = "END" ; STDIN.getc
|
134
|
+
when '2' then chr = "INS" ; chr = "C-INS" if STDIN.getc == "^"
|
135
|
+
when '3' then chr = "DEL" ; chr = "C-DEL" if STDIN.getc == "^"
|
136
|
+
when '5' then chr = "PgUP" ; chr = "C-PgUP" if STDIN.getc == "^"
|
137
|
+
when '6' then chr = "PgDOWN" ; chr = "C-PgDOWN" if STDIN.getc == "^"
|
138
|
+
when '7' then chr = "HOME" ; chr = "C-HOME" if STDIN.getc == "^"
|
139
|
+
when '8' then chr = "END" ; chr = "C-END" if STDIN.getc == "^"
|
140
|
+
end
|
141
|
+
when 'O'
|
142
|
+
case $stdin.getc
|
143
|
+
when 'a' then chr = "C-UP"
|
144
|
+
when 'b' then chr = "C-DOWN"
|
145
|
+
when 'c' then chr = "C-RIGHT"
|
146
|
+
when 'd' then chr = "C-LEFT"
|
140
147
|
end
|
141
148
|
end
|
142
149
|
when "", "" then chr = "BACK"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: curses-extension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Geir Isene
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: curses
|
@@ -35,7 +35,8 @@ description: 'The Ruby curses library is sorely lacking some important features.
|
|
35
35
|
terminal curses applications in Ruby. See the Github page for information on what
|
36
36
|
properties and functions are included: https://github.com/isene/Ruby-Curses-Class-Extension.
|
37
37
|
The curses_template.rb is also installed in the lib directory and serves as the
|
38
|
-
basis for my own curses applications. New in 1.1.
|
38
|
+
basis for my own curses applications. New in 1.1.4: In the template, also catch
|
39
|
+
Control+Key sequence'
|
39
40
|
email: g@isene.com
|
40
41
|
executables: []
|
41
42
|
extensions: []
|