rizin icon indicating copy to clipboard operation
rizin copied to clipboard

Support mouse clicks in "cursor" mode of hex editor.

Open notxvilka opened this issue 5 months ago • 3 comments

If we go in the cursor mode (press c key in the visual hexdump mode) it only allows to move it using keys. Would be great to also support direct move with a mouse click, modern terminals allow that.

Image

notxvilka avatar Jul 09 '25 14:07 notxvilka

I'd like to work on this issue

Sl4y3r-07 avatar Oct 31 '25 07:10 Sl4y3r-07

Hi @notxvilka Though I have added the support for mouse click (for px mode). Do we need to add support for other modes like - pxw, pxr, pxa, pxb, pxq, pxr, pxh, pxd ?

Sl4y3r-07 avatar Nov 01 '25 02:11 Sl4y3r-07

RZ_IPI void rz_core_visual_applyHexMode(RzCore *core, int hexMode) {
	RzCoreVisual *visual = core->visual;
	visual->currentFormat = RZ_ABS(hexMode) % PRINT_HEX_FORMATS;
	switch (visual->currentFormat) {
	case 0: /* px */
	case 3: /* prx */
	case 6: /* pxw */
	case 9: /* pxr */
		rz_config_set(core->config, "hex.compact", "false");
		rz_config_set(core->config, "hex.comments", "true");
		break;
	case 1: /* pxa */
	case 4: /* pxb */
	case 7: /* pxq */
		rz_config_set(core->config, "hex.compact", "true");
		rz_config_set(core->config, "hex.comments", "true");
		break;
	case 2: /* pxr */
	case 5: /* pxh */
	case 8: /* pxd */
		rz_config_set(core->config, "hex.compact", "false");
		rz_config_set(core->config, "hex.comments", "false");
		break;
	}
}

@notxvilka Can you please tell me why two cases are there for pxr ? case 9 and case 2

Sl4y3r-07 avatar Nov 05 '25 08:11 Sl4y3r-07