Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 11-16-2012, 09:21 PM   #16
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Double fingers = middle click. Triple = "bugger all" or middle click

xmodmap -e "pointer = 1 3 2" to remap right to middle and vice versa.

I have the bits now to run this stuff without debian as outlined: https://www.mobileread.com/forums/sho...&postcount=107

will stick it in the mix.

thanks all for your help.
twobob is offline   Reply With Quote
Old 11-17-2012, 12:49 AM   #17
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Quote:
Originally Posted by h1uke View Post
just FYI. My impression that linux touchscreen device driver on PW cannot
convey 3- or more fingers tap messages.
I tried this many times while creating a rudimentary touchscreen support for Qt
on KPW, but with no luck.
PW touchscreen kernel driver code expects up to 16 simultaneous touches, but tracks only up to 4. PW uses Cypress TrueTocuh Gen3 touchscreen, which certainly supports more than 2 simultaneous touches: you can look at it's capabilities at http://www.cypress.com/touch (open "Solutions" tab; can't provide direct link).

Excerpt from 5.3.0 kernel sources:
Spoiler:
Code:
$ grep -A34 -m1 cyttsp_i2c_platform_data drivers/input/touchscreen/cyttsp.c
static struct cyttsp_platform_data cyttsp_i2c_platform_data = {
	.mt_sync = 0,
	.maxx = 758,
	.maxy = 1024,
	.flags = 0,
	.gen = CY_GEN3,
	.use_st = 0,
	.use_mt = 1,
	.use_trk_id = 1,
	.use_hndshk = 1,
	.use_timer = 0,
	.use_sleep = 1,
	.use_gestures = 0,
	.use_load_file = 1,
	.use_force_fw_update = 1,
	.use_virtual_keys = 0,
	.use_lpm = 0,
	/* activate up to 4 groups
	 * and set active distance
	 */
	.gest_set = 0,
	/* change act_intrvl to customize the Active power state
	 * scanning/processing refresh interval for Operating mode
	 */
	.act_intrvl = CY_ACT_INTRVL_DFLT,
	/* change tch_tmout to customize the touch timeout for the
	 * Active power state for Operating mode
	 */
	.tch_tmout = CY_TCH_TMOUT_DFLT,
	/* change lp_intrvl to customize the Low Power power state
	 * scanning/processing refresh interval for Operating mode
	 */
	.lp_intrvl = CY_LP_INTRVL_DFLT,
	.name = CY_DRIVER_NAME,
};
Code:
$ grep -B1 -m3 'CY_NUM.*ID' drivers/input/touchscreen/cyttsp.h
/* maximum number of concurrent ST track IDs */
#define CY_NUM_ST_TCH_ID            2
/* maximum number of concurrent MT track IDs */
#define CY_NUM_MT_TCH_ID            4
/* maximum number of track IDs */
#define CY_NUM_TRK_ID               16
Code:
$ grep mt_create_slots drivers/input/touchscreen/cyttsp.c
		input_mt_create_slots(input_device, CY_NUM_TRK_ID);
Code:
$ grep -A33 Multi-Touch ./drivers/input/touchscreen/cyttsp.c
	/* set Multi-Touch current event signals */
	for (id = 0; id < CY_NUM_MT_TCH_ID; id++) {
		if (t->cur_mt_tch[id] >= CY_NUM_TRK_ID)
			continue;
		
		if ((slot = find_slot_by_id(t->cur_mt_tch[id])) < 0)
		{
			slot = find_next_slot();
			slots[slot] = t->cur_mt_tch[id];				
		}
		
		input_report_abs(ts->input, ABS_MT_SLOT, slot);
		input_report_abs(ts->input, ABS_MT_TRACKING_ID, slot);

		input_report_abs(ts->input, ABS_MT_POSITION_X,
						t->cur_mt_pos[id][CY_XPOS]);
		input_report_abs(ts->input, ABS_MT_POSITION_Y,
						t->cur_mt_pos[id][CY_YPOS]);
		if (mt_sync_func)
			mt_sync_func(ts->input);

		ts->act_trk[id] = CY_TCH;
		ts->prv_mt_pos[id][CY_XPOS] = t->cur_mt_pos[id][CY_XPOS];
		ts->prv_mt_pos[id][CY_YPOS] = t->cur_mt_pos[id][CY_YPOS];
		contacts_left++;
	}

	send_user_event(ts, ts->num_prv_st_tch, contacts_left);
	ts->num_prv_st_tch = contacts_left;
	
	input_report_key(ts->input, BTN_TOUCH, contacts_left > 0);
	input_report_key(ts->input, BTN_TOOL_FINGER, contacts_left >= 1);
	input_report_key(ts->input, BTN_TOOL_DOUBLETAP, contacts_left >= 2);
	input_report_key(ts->input, BTN_TOOL_TRIPLETAP, contacts_left == 3);


KT touchscreen driver has similar explicit limitation for number of simultaneous touches:
Code:
$ grep -B1 -m1 MAX_CONTACTS drivers/input/touchscreen/zforceint.h
/* Device specific configuration */
#define MAX_CONTACTS                2    // Maximum number of contacts the sensor can report
Code:
$ grep mt_create_slots drivers/input/touchscreen/zforce.c  
  input_mt_create_slots(tdev, MAX_CONTACTS);
BTW, you can try your's luck with enabling of 1mm stylus sensing (selection should be possible with file buried somewhere in /sys):
Spoiler:
Code:
$ grep -B1 CY_SCN drivers/input/touchscreen/cyttsp.h
/* Scan Type selection for finger and/or stylus activation */
#define CY_SCN_TYP_DFLT 0x01 /* finger only mutual scan */
#define CY_SCN_TYP_MUT_SELF 0x03 /*self scan and mutual scan*/
#define CY_SCN_TYP_SELF 0x02 /*self scan*/
#define CY_SCN_TYP_MUTUAL 0x01 /*mutual scan*/
Code:
$ grep '\(mutual\|self\|scan\)' ./drivers/input/touchscreen/cyttsp.c
	 * scanning/processing refresh interval for Operating mode
	 * scanning/processing refresh interval for Operating mode
 * 	test mode, scan type, 
 * 	TT_MODE[7:6] new data counter (00, 10 or 01 11), TT_MODE[1:0] scan type
		printk(KERN_INFO "%s:scan_type=0x%x\n", __func__, cyttsp_tsc->scn_typ);
	 * new data counter TT_MODE[7:6] = 00, scan type TT_MODE[1:0] = 00 (mutual scan)
	sscanf(buf, "%d %d %d", &ai, &tout, &li);
static ssize_t attr_sysinfo_scan_type_show(struct device *dev,
		printk(KERN_ERR "cyttsp:scan_type::cannot communicate when device is suspended");
	printk(KERN_INFO "scan type read 0x%x", scn_typ);
			len = sprintf(buf, "mutual-self");
			len = sprintf(buf, "mutual");
			len = sprintf(buf, "self");
			len = sprintf(buf, "?scan type: 0x%x", scn_typ);
static ssize_t attr_sysinfo_scan_type_store(struct device *dev,
		printk(KERN_ERR "cyttsp:scan_type::cannot communicate when device is suspended");
		if(0 == strncmp(buf, "mutual", 6)) {
		}else if(0 == strncmp(buf, "self", 4)) {
		}else if(0 == strncmp(buf, "mutual-self", 11)) {
			printk(KERN_ERR "cannot recognize scan type %s", buf);
		printk(KERN_INFO "\n\n%s scan_type read: 0x%x\n\n", __func__, st_read);
	printk(KERN_INFO "\n\n%s scan_type read: 0x%x retry %d\n\n", __func__, st_read, retry);	
static struct device_attribute sysinfo_scan_type =
	__ATTR(sysinfo_scan_type, 0644, attr_sysinfo_scan_type_show, attr_sysinfo_scan_type_store);	
	retval = device_create_file(&pdev->dev, &sysinfo_scan_type);	
		goto device_create_error_scan_type;
device_create_error_scan_type:
	device_remove_file(&pdev->dev, &sysinfo_scan_type);
	device_remove_file(&pdev->dev, &sysinfo_scan_type);
eureka is offline   Reply With Quote
Old 11-17-2012, 03:02 AM   #18
h1uke
Zealot
h1uke can do the Funky Gibbon.h1uke can do the Funky Gibbon.h1uke can do the Funky Gibbon.h1uke can do the Funky Gibbon.h1uke can do the Funky Gibbon.h1uke can do the Funky Gibbon.h1uke can do the Funky Gibbon.h1uke can do the Funky Gibbon.h1uke can do the Funky Gibbon.h1uke can do the Funky Gibbon.h1uke can do the Funky Gibbon.
 
Posts: 121
Karma: 82565
Join Date: Aug 2010
Location: Maryland, USA
Device: dxg, k3w,k4nt,kpw
Quote:
Originally Posted by eureka View Post
BTW, you can try your's luck with enabling of 1mm stylus sensing
.. and use three styli simultaneously to operate the Kindle..

On a serious note: my goal was more practical. I was trying to find a neutral gesture
which could serve as a user special action introducer, and at the same time, minimally
disturb the standard Kindle software. Based on what I observed, the "Tool Tripletap" was
excluded from consideration. Events of this kind are not signaled (by the driver?) and
do not reach the application. The reason for that is currently unknown.
h1uke is offline   Reply With Quote
Old 11-17-2012, 03:33 AM   #19
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Quote:
Originally Posted by h1uke View Post
.. and use three styli simultaneously to operate the Kindle..
I was just curious, whether scan modes really could be changed on PW and whether thin stylus will really works on capacitive touchscreen (in self scan mode, maybe?).
eureka is offline   Reply With Quote
Old 11-17-2012, 09:13 AM   #20
baf
Evangelist
baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.
 
Posts: 404
Karma: 2200000
Join Date: May 2012
Device: kt
Quote:
Originally Posted by h1uke View Post
On a serious note: my goal was more practical. I was trying to find a neutral gesture
which could serve as a user special action introducer, and at the same time, minimally
disturb the standard Kindle software. Based on what I observed, the "Tool Tripletap" was
excluded from consideration. Events of this kind are not signaled (by the driver?) and
do not reach the application. The reason for that is currently unknown.
Good choice might be long press, which AFAIR has its unique Xevent code.
For example short press selects item, long press opens context menu.
baf is offline   Reply With Quote
Old 11-17-2012, 09:29 AM   #21
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Quote:
Originally Posted by h1uke View Post
On a serious note: my goal was more practical. I was trying to find a neutral gesture
which could serve as a user special action introducer, and at the same time, minimally
disturb the standard Kindle software. Based on what I observed, the "Tool Tripletap" was
excluded from consideration. Events of this kind are not signaled (by the driver?) and
do not reach the application. The reason for that is currently unknown.
Do you want to implement launchpad analog for PW?

If it will help you, you can intercept user press on Menu button with lipc-set-prop command (but don't use double click event, as shown in linked example, it's very hard to make double click). interrogatePillow property of com.lab126.pillow allows to execute arbitrary JavaScript code in context of HTML page representing top bar (with search field, Menu button, etc.). With manipulating of DOM you can also add your own button to top bar. It will be a bit like GUI launcher, but it will work not only at Home screen.
eureka is offline   Reply With Quote
Old 11-17-2012, 09:32 AM   #22
baf
Evangelist
baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.
 
Posts: 404
Karma: 2200000
Join Date: May 2012
Device: kt
pcmanfm

If you want to test pcmanfm, here is a binary for KT. I only changed window title so that it is properly mapped in window manager. I didn't test it deeply, but it surely needs further development. It crashes sometimes and I suppose some windows may not open properly. It also misses some pixmaps etc. But you can get general idea of what it looks like in Kindle.
Attached Files
File Type: zip pcmanfm.zip (165.3 KB, 204 views)
baf is offline   Reply With Quote
Old 11-17-2012, 11:54 AM   #23
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Quote:
Originally Posted by baf View Post
If you want to test pcmanfm, here is a binary for KT. I only changed window title so that it is properly mapped in window manager. I didn't test it deeply, but it surely needs further development. It crashes sometimes and I suppose some windows may not open properly. It also misses some pixmaps etc. But you can get general idea of what it looks like in Kindle.
nice. only bug I spotted was preferences don't pop up.
Attached Thumbnails
Click image for larger version

Name:	TightVNC: kindle:0.0_148.png
Views:	287
Size:	30.6 KB
ID:	96381   Click image for larger version

Name:	TightVNC: kindle:0.0_149.png
Views:	304
Size:	37.7 KB
ID:	96382   Click image for larger version

Name:	TightVNC: kindle:0.0_150.png
Views:	299
Size:	56.3 KB
ID:	96383   Click image for larger version

Name:	TightVNC: kindle:0.0_151.png
Views:	305
Size:	57.9 KB
ID:	96384  
twobob is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
otfm - file manager Dmitry Shkarin Onyx Boox 31 09-12-2013 01:38 PM
ES File Explorer, Astro File Manager or File Manager HD? DreamWriter Android Devices 15 04-05-2012 03:00 PM
ES file manager cypherslock Kobo Tablets 1 11-06-2011 01:34 AM
Android Astro File Manager cheyennedonna enTourage Archive 0 05-07-2010 12:24 PM


All times are GMT -4. The time now is 09:19 PM.


MobileRead.com is a privately owned, operated and funded community.